Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

Merge pull request #398 from findy-network/add-new-scripts #1267

Merge pull request #398 from findy-network/add-new-scripts

Merge pull request #398 from findy-network/add-new-scripts #1267

Workflow file for this run

name: test
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: setup go and lint
uses: findy-network/setup-go-action@master
with:
linter-config-path: .golangci.yml
- name: test
run: make test_cov_out
- name: store coverage file
uses: actions/upload-artifact@v4
with:
name: ${{ github.sha }}-coverage.txt
path: ./coverage.txt
retention-days: 1
e2e:
runs-on: ubuntu-latest
steps:
- name: test e2e flow
uses: findy-network/e2e-test-action@master
with:
service: "cli"
- uses: actions/setup-go@v5
with:
go-version-file: "./go.mod"
- name: convert coverage to txt
run: go tool covdata textfmt -i=coverage -o coverage-e2e.txt
- name: store coverage file
uses: actions/upload-artifact@v4
with:
name: ${{ github.sha }}-coverage-e2e.txt
path: ./coverage-e2e.txt
retention-days: 1
upload-coverage:
runs-on: ubuntu-latest
needs: [test, e2e]
steps:
- name: checkout
uses: actions/checkout@v4
- name: download coverage file
uses: actions/download-artifact@v4
with:
name: ${{ github.sha }}-coverage.txt
- name: download coverage file
uses: actions/download-artifact@v4
with:
name: ${{ github.sha }}-coverage-e2e.txt
- name: upload coverage
uses: codecov/codecov-action@v4
with:
files: ./coverage.txt,./coverage-e2e.txt
fail_ci_if_error: ${{ github.ref_name != 'dev' }}
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}