| on: [push, pull_request] |
| name: Test |
| jobs: |
| lint: |
| runs-on: ubuntu-latest |
| steps: |
| - name: Install Go |
| uses: WillAbides/setup-go-faster@main |
| with: |
| go-version: 1.18.x |
| - uses: actions/checkout@v3 |
| with: |
| path: './src/github.com/kevinburke/ssh_config' |
| # staticcheck needs this for GOPATH |
| - run: | |
| echo "GO111MODULE=off" >> $GITHUB_ENV |
| echo "GOPATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV |
| echo "PATH=$GITHUB_WORKSPACE/bin:$PATH" >> $GITHUB_ENV |
| - name: Run tests |
| run: make lint |
| working-directory: './src/github.com/kevinburke/ssh_config' |
| |
| test: |
| strategy: |
| matrix: |
| go-version: [1.17.x, 1.18.x, 1.19.x] |
| runs-on: ubuntu-latest |
| steps: |
| - name: Install Go |
| uses: WillAbides/setup-go-faster@main |
| with: |
| go-version: ${{ matrix.go-version }} |
| - uses: actions/checkout@v3 |
| with: |
| path: './src/github.com/kevinburke/ssh_config' |
| - run: | |
| echo "GO111MODULE=off" >> $GITHUB_ENV |
| echo "GOPATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV |
| echo "PATH=$GITHUB_WORKSPACE/bin:$PATH" >> $GITHUB_ENV |
| - name: Run tests with race detector on |
| run: make race-test |
| working-directory: './src/github.com/kevinburke/ssh_config' |