Schedule tests #1405
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: Schedule tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: "* 14 * * *" | |
jobs: | |
tests: | |
name: Test | |
if: ${{ github.event.head_commit.message != 'Initial commit' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.20" | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Restore Cache | |
uses: actions/cache@v3 | |
with: | |
# In order: | |
# * Module download cache | |
# * Build cache (Linux) | |
# * Build cache (Mac) | |
# * Build cache (Windows) | |
path: | | |
~/go/pkg/mod | |
~/.cache/go-build | |
~/Library/Caches/go-build | |
%LocalAppData%\go-build | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Test | |
run: go test -race -covermode=atomic -coverprofile=coverage.txt ./... | |
- name: Upload coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos | |