| 1 |
on: [push, pull_request] |
| 2 |
name: Test |
| 3 |
jobs: |
| 4 |
lint: |
| 5 |
runs-on: ubuntu-latest |
| 6 |
steps: |
| 7 |
- name: Install Go |
| 8 |
uses: WillAbides/setup-go-faster@main |
| 9 |
with: |
| 10 |
go-version: 1.21.x |
| 11 |
- uses: actions/checkout@v4 |
| 12 |
with: |
| 13 |
path: './src/github.com/iamFrancescoFerro/ssh_config' |
| 14 |
|
| 15 |
- run: | |
| 16 |
echo "GO111MODULE=off" >> $GITHUB_ENV |
| 17 |
echo "GOPATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV |
| 18 |
echo "PATH=$GITHUB_WORKSPACE/bin:$PATH" >> $GITHUB_ENV |
| 19 |
- name: Run tests |
| 20 |
run: make lint |
| 21 |
working-directory: './src/github.com/iamFrancescoFerro/ssh_config' |
| 22 |
|
| 23 |
test: |
| 24 |
strategy: |
| 25 |
matrix: |
| 26 |
go-version: [1.17.x, 1.18.x, 1.19.x, 1.20.x, 1.21.x] |
| 27 |
runs-on: ubuntu-latest |
| 28 |
steps: |
| 29 |
- name: Install Go |
| 30 |
uses: WillAbides/setup-go-faster@main |
| 31 |
with: |
| 32 |
go-version: ${{ matrix.go-version }} |
| 33 |
- uses: actions/checkout@v4 |
| 34 |
with: |
| 35 |
path: './src/github.com/iamFrancescoFerro/ssh_config' |
| 36 |
- run: | |
| 37 |
echo "GO111MODULE=off" >> $GITHUB_ENV |
| 38 |
echo "GOPATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV |
| 39 |
echo "PATH=$GITHUB_WORKSPACE/bin:$PATH" >> $GITHUB_ENV |
| 40 |
- name: Run tests with race detector on |
| 41 |
run: make race-test |
| 42 |
working-directory: './src/github.com/iamFrancescoFerro/ssh_config' |