name: GoLang Tests run-name: ${{ gitea.actor }} is testing golang Code on: [push] jobs: testing: name: check and test runs-on: ubuntu-latest env: POSTGRES_USER: root POSTGRES_PASSWORD: password POSTGRES_DB: arbeitszeitmessung POSTGRES_PORT: 5432 steps: - uses: harmon758/postgresql-action@v1 with: postgresql version: "16" postgresql user: ${{ env.POSTGRES_USER }} postgresql password: ${{ env.POSTGRES_PASSWORD }} postgresql db: ${{ env.POSTGRES_DB }} - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 # all history for all branches and tags - name: Setup go uses: actions/setup-go@v5 with: go-version-file: Backend/go.mod check-latest: true - uses: https://gitea.com/actions/go-hashfiles@v0.0.1 id: hash-go with: patterns: | go.mod go.sum - name: cache go id: cache-go uses: actions/cache@v4 with: path: | /go_path /go_cache key: go_path-${{ steps.hash-go.outputs.hash }} - name: Run Go Test run: make test