ci: fix #127
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: Tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
test: | |
name: Run tests | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '1.23.2' | |
# Cache Go modules | |
- name: Cache Go Modules | |
uses: actions/cache@v3 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
# Test Build aw-sync-agent for Linux | |
- name: Test build aw-sync-agent | |
working-directory: aw-sync-agent | |
run: | | |
GOOS=linux GOARCH=amd64 go build | |
# Run Go tests | |
- name: Run Go tests | |
working-directory: aw-sync-agent | |
run: go test ./tests/ |