Skip to content

removed semgrep workflow (#42) #95

removed semgrep workflow (#42)

removed semgrep workflow (#42) #95

Workflow file for this run

name: unit-tests
on: [push]
jobs:
cancel:
runs-on: ubuntu-latest
name: Cancel Previous Runs
if: always()
steps:
- uses: styfle/cancel-workflow-action@d57d93c3a8110b00c3a2c0b64b8516013c9fd4c9
if: github.ref != 'refs/heads/master'
name: cancel old workflows
id: cancel
with:
access_token: ${{ github.token }}
- if: github.ref == 'refs/heads/master'
name: Don't cancel old workflows
id: dont_cancel
run: |
echo "Don't cancel old workflow"
tests:
name: unit-tests
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
- name: Checkout code
uses: actions/checkout@v2
- name: Unit test
run: go test -v ./... -coverprofile=coverage.txt
- name: Archive code coverage results
if: contains(github.ref, 'master')
uses: actions/upload-artifact@v2
with:
name: code-coverage-report
path: ./coverage.txt
code-coverage:
name: Upload code coverage
runs-on: ubuntu-latest
needs: tests
if: contains(github.ref, 'master')
steps:
- uses: actions/checkout@master
- name: Download coverage report
uses: actions/download-artifact@v2
with:
name: code-coverage-report
- uses: codecov/codecov-action@v1
with:
file: ./coverage.txt
flags: unittests
name: go-financial
fail_ci_if_error: true
verbose: true