fix broken tests #6
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: build-and-test | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- v* | |
pull_request: | |
types: [opened, edited] | |
pull_request_target: | |
types: [opened, edited] | |
env: | |
GO_VERSION: "~1.20" | |
GO111MODULE: "on" | |
jobs: | |
test-build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Task | |
uses: arduino/setup-task@v2 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Build Application | |
run: task build | |
- name: Run functional test | |
env: | |
EGET_CONFIG: eget.toml | |
EGET_BIN: '' | |
TEST_EGET: ../dist/eget | |
run: cd test && go run test_eget.go | |
run-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Task | |
uses: arduino/setup-task@v2 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Run unit tests with coverage | |
run: task test-coverage | |
- name: Upload coverage reports to Codecov | |
if: ${{success()}} | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage-app.out,./coverage-lib.out |