update pre-commit, fix some yaml #23
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: code verification | |
on: [push] # yamllint disable-line rule:truthy | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repo and build scripts | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install Golang | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
- name: Build | |
run: make build | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repo and build scripts | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install Golang | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
- name: Run pre-commit | |
uses: pre-commit/[email protected] | |
- name: Test | |
run: make test cover | |
- name: Upload coverage | |
uses: actions/upload-artifact@v3 | |
with: | |
name: go-coverage | |
path: .build/coverage/go-coverage.txt | |
check-coverage: | |
runs-on: ubuntu-latest | |
needs: | |
- test | |
steps: | |
- name: Check out repo and build scripts | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Download coverage | |
uses: actions/download-artifact@v3 | |
- name: Check coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |