build(deps): bump github.com/hashicorp/terraform-plugin-testing (#616) #1144
This file contains hidden or 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: Test | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
| - name: Read Go version | |
| id: go-version | |
| run: echo "version=$(cat ./.go-version)" >> $GITHUB_OUTPUT | |
| - name: Install Go | |
| uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
| with: | |
| go-version: ${{ steps.go-version.outputs.version }} | |
| - name: Run go vet | |
| run: make vet | |
| - name: Install Nomad | |
| env: | |
| NOMAD_LICENSE: ${{ secrets.NOMAD_LICENSE }} | |
| run: | | |
| ./scripts/getnomad.sh | |
| - name: Start nomad | |
| env: | |
| NOMAD_LICENSE: ${{ secrets.NOMAD_LICENSE }} | |
| run: ./scripts/start-nomad.sh | |
| - name: Run acceptance tests | |
| run: NOMAD_TOKEN=${{ env.NOMAD_TOKEN }} make testacc | |
| env: | |
| NOMAD_TOKEN: 00000000-0000-0000-0000-000000000000 | |
| - name: Stop nomad | |
| if: always() | |
| run: ./scripts/stop-nomad.sh | |
| - name: Make Nomad data dir and log file readable | |
| if: always() | |
| run: | | |
| sudo chmod -R 777 /tmp/nomad | |
| sudo chmod 666 /tmp/nomad.log |