From 27b95c19bc2992df4c694ef45f872241a33a77cb Mon Sep 17 00:00:00 2001 From: Winni Neessen Date: Sat, 7 May 2022 15:03:09 +0200 Subject: [PATCH 1/4] Update and rename codecov.yml to codecov_testonly.yml --- .github/workflows/{codecov.yml => codecov_testonly.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{codecov.yml => codecov_testonly.yml} (95%) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov_testonly.yml similarity index 95% rename from .github/workflows/codecov.yml rename to .github/workflows/codecov_testonly.yml index ad50212..b80cd65 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov_testonly.yml @@ -22,7 +22,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - go: [1.15, 1.16, 1.17, 1.18] + go: [1.15, 1.16, 1.17] steps: - name: Checkout Code uses: actions/checkout@master From 2cd451a84d75bfa3b157b12ae727bcd322b05dd8 Mon Sep 17 00:00:00 2001 From: Winni Neessen Date: Sat, 7 May 2022 15:03:43 +0200 Subject: [PATCH 2/4] Update codecov_testonly.yml --- .github/workflows/codecov_testonly.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/codecov_testonly.yml b/.github/workflows/codecov_testonly.yml index b80cd65..0401aba 100644 --- a/.github/workflows/codecov_testonly.yml +++ b/.github/workflows/codecov_testonly.yml @@ -30,9 +30,3 @@ jobs: - name: Run Tests run: | go test -v -race --coverprofile=coverage.coverprofile --covermode=atomic . - - - name: Upload coverage to Codecov - if: success() && matrix.go == 1.18 && matrix.os == 'ubuntu-latest' - uses: codecov/codecov-action@v2 - with: - token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos From 356b48bed778138b45e18b166eb07637531e88cb Mon Sep 17 00:00:00 2001 From: Winni Neessen Date: Sat, 7 May 2022 15:04:51 +0200 Subject: [PATCH 3/4] Create codecov.yml --- .github/workflows/codecov.yml | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/codecov.yml diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml new file mode 100644 index 0000000..df1de10 --- /dev/null +++ b/.github/workflows/codecov.yml @@ -0,0 +1,40 @@ +name: Codecov workflow +on: + push: + branches: + - main + paths: + - '**.go' + - 'go.*' + - '.github/**' + - 'codecov.yml' + pull_request: + branches: + - main + paths: + - '**.go' + - 'go.*' + - '.github/**' + - 'codecov.yml' +env: + HIBP_API_KEY: ${{ secrets.HIBP_API_KEY }} +jobs: + run: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + go: [1.18] + steps: + - name: Checkout Code + uses: actions/checkout@master + + - name: Run Tests + run: | + go test -v -race --coverprofile=coverage.coverprofile --covermode=atomic . + + - name: Upload coverage to Codecov + if: success() && matrix.go == 1.18 && matrix.os == 'ubuntu-latest' + uses: codecov/codecov-action@v2 + with: + token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos From 90124586b8304d8829ba245196efdb724a693a71 Mon Sep 17 00:00:00 2001 From: Winni Neessen Date: Sat, 7 May 2022 15:05:09 +0200 Subject: [PATCH 4/4] Update codecov_testonly.yml --- .github/workflows/codecov_testonly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codecov_testonly.yml b/.github/workflows/codecov_testonly.yml index 0401aba..9dcdbe7 100644 --- a/.github/workflows/codecov_testonly.yml +++ b/.github/workflows/codecov_testonly.yml @@ -22,7 +22,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - go: [1.15, 1.16, 1.17] + go: [1.15, 1.16, 1.17, 1.18] steps: - name: Checkout Code uses: actions/checkout@master