Skip to content

feat: only run tests for changed files #3

feat: only run tests for changed files

feat: only run tests for changed files #3

Workflow file for this run

name: Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Extract Go version from go.mod
id: go-version
run: echo "go-version=$(grep '^go ' go.mod | awk '{print $2}')" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.go-version }}
- name: Install dependencies
run: go mod tidy
- name: Run tests
run: go test ./...