From 58b4ee37ad3e6dc01177762340f99e0094480c26 Mon Sep 17 00:00:00 2001 From: Laura Vuorenoja Date: Mon, 5 Feb 2024 11:48:28 +0200 Subject: [PATCH 1/2] Use releaser bot. --- .github/workflows/do-release.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/do-release.yml b/.github/workflows/do-release.yml index 7345b2e..0d31297 100644 --- a/.github/workflows/do-release.yml +++ b/.github/workflows/do-release.yml @@ -9,8 +9,15 @@ jobs: runs-on: ubuntu-latest name: Tag release if changes steps: + - name: Generate a token + id: generate_token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ secrets.AGENCY_RELEASER_ID }} + private-key: ${{ secrets.AGENCY_RELEASER_KEY }} - uses: findy-network/releaser-action@master with: - # use personal access token so that events are created for tag push - token: ${{ secrets.RELEASER_PAT }} + token: ${{ steps.generate_token.outputs.token }} gate: test + env: + GH_TOKEN: ${{ steps.generate_token.outputs.token }} From cb4c0e2acc01c854fca5e6645ed1c47d7d5a3a90 Mon Sep 17 00:00:00 2001 From: Laura Vuorenoja Date: Thu, 8 Feb 2024 13:19:39 +0200 Subject: [PATCH 2/2] Add token for codecov. --- .github/workflows/test.yml | 69 +++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0a76005..6220c7d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,39 +28,39 @@ jobs: - repository: "findy-agent-auth" steps: - # install indy - - uses: actions/checkout@v3 - if: ${{ matrix.repository == 'findy-agent' }} - with: - repository: "findy-network/findy-wrapper-go" - - name: install indy - if: ${{ matrix.repository == 'findy-agent' }} - run: make indy_to_debian - - uses: actions/checkout@v3 - - uses: actions/checkout@v3 - with: - repository: "findy-network/${{ matrix.repository }}" - ref: dev - path: './target' - - uses: actions/setup-go@v3 - with: - go-version-file: './go.mod' - - name: test with ${{ matrix.repository }} - run: | - cd ./target - go mod edit -replace github.com/findy-network/findy-common-go=../ - go mod tidy -e - go test -p 1 -failfast -timeout=1200s \ - -coverpkg=github.com/findy-network/findy-common-go/... \ - -coverprofile=coverage-${{ matrix.repository }}.txt \ - -covermode=atomic \ - ./... - - name: store coverage file - uses: actions/upload-artifact@v3 - with: - name: ${{ github.sha }}-coverage-${{ matrix.repository }}.txt - path: ./target/coverage-${{ matrix.repository }}.txt - retention-days: 1 + # install indy + - uses: actions/checkout@v3 + if: ${{ matrix.repository == 'findy-agent' }} + with: + repository: "findy-network/findy-wrapper-go" + - name: install indy + if: ${{ matrix.repository == 'findy-agent' }} + run: make indy_to_debian + - uses: actions/checkout@v3 + - uses: actions/checkout@v3 + with: + repository: "findy-network/${{ matrix.repository }}" + ref: dev + path: "./target" + - uses: actions/setup-go@v3 + with: + go-version-file: "./go.mod" + - name: test with ${{ matrix.repository }} + run: | + cd ./target + go mod edit -replace github.com/findy-network/findy-common-go=../ + go mod tidy -e + go test -p 1 -failfast -timeout=1200s \ + -coverpkg=github.com/findy-network/findy-common-go/... \ + -coverprofile=coverage-${{ matrix.repository }}.txt \ + -covermode=atomic \ + ./... + - name: store coverage file + uses: actions/upload-artifact@v3 + with: + name: ${{ github.sha }}-coverage-${{ matrix.repository }}.txt + path: ./target/coverage-${{ matrix.repository }}.txt + retention-days: 1 env: FAV_DB_PASSWORD: password @@ -97,8 +97,9 @@ jobs: with: name: ${{ github.sha }}-coverage-findy-agent-auth.txt - name: upload coverage - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: files: ./coverage.txt,./coverage-findy-agent.txt,./coverage-findy-agent-vault.txt,./coverage-findy-agent-auth.txt fail_ci_if_error: true verbose: true + token: ${{ secrets.CODECOV_TOKEN }}