Merge pull request #127 from testwill/fmt #308
Workflow file for this run
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 | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
build: | |
name: Build | |
strategy: | |
matrix: | |
go-version: [1.18.x] | |
platform: [ubuntu-latest] # not macos-latest | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Cache-Go | |
uses: actions/cache@v1 | |
with: | |
path: | | |
~/go/pkg/mod # Module download cache | |
~/.cache/go-build # Build cache (Linux) | |
~/Library/Caches/go-build # Build cache (Mac) | |
'%LocalAppData%\go-build' # Build cache (Windows) | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
- name: Install dep libs | |
run: | | |
sudo apt-get update | |
sudo apt-get install libgl1-mesa-dev xorg-dev | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Build | |
run: | | |
make build | |
- name: Test | |
run: | | |
make test | |
- name: Upload-Coverage | |
if: matrix.platform == 'ubuntu-latest' | |
run: bash <(curl -s https://codecov.io/bash) |