medium.rip/.github/workflows/test.yml

39 lines
793 B
YAML
Raw Normal View History

name: Run tests
on: [push, pull_request]
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ["1.18", "1.19", "1.20"]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'pnpm'
cache-dependency-path: frontend/pnpm-lock.yaml
- name: Build frontend
run: |
cd frontend
pnpm install --frozen-lockfile
pnpm run build
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Build
run: go build .
- name: Test
run: go test ./...