Merge pull request #9 from Goutte/feat-adapt-to-actual-usage #81
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.20" | |
- name: Build | |
run: make | |
- name: Test | |
run: make test | |
coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the source repository | |
# https://github.com/actions/checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- name: Fetch git history and tags (for fixtures) | |
run: git fetch --tags origin main | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
# Integration testing with coverage requires >=1.20 | |
go-version: ">=1.20" | |
- name: Build | |
run: make | |
- name: Test | |
run: make test | |
- name: Generate coverage report | |
run: make coverage | |
- name: Generate integration tests coverage report | |
run: make coverage-acceptance | |
- name: Upload unit tests coverage report | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ./coverage-unit.txt | |
flags: unittests | |
- name: Upload integration tests coverage report | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ./coverage-integration.txt | |
flags: integration |