changed to pull_request_target with needing to be labeled #16
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: Go Tests | |
on: [push] | |
jobs: | |
paths-filter: | |
runs-on: ubuntu-latest | |
outputs: | |
files: ${{ steps.filter.outputs.go_files }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
list-files: 'json' | |
filters: | | |
go: | |
- 'go/**/**' | |
go-tests: | |
runs-on: ubuntu-latest | |
needs: paths-filter | |
strategy: | |
matrix: | |
go-version: [ '1.22.0' ] | |
changed-files: ${{ fromJSON(needs.paths-filter.outputs.files) }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Go ${{ matrix.go-version }} | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: go tests | |
run: | | |
cd $(dirname ${{matrix.changed-files}}) && go test ./... -v | |