debug: fixed actions with newer version of Go #2
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: CI/CD for building Bankie | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Go environment | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.20.4 | |
- name: Build | |
run: go build ./cmd/app | |
- name: Run tests | |
run: go test -v ./... | |
- name: Create coverage report | |
run: go test -coverprofile=coverage.out ./... | |
- name: Upload coverage report | |
uses: codecov/codecov-action@v2 | |
with: | |
file: coverage.out | |
flags: unittests | |