Updating some Action versions and disabling KBase auth2 server tests #543
Workflow file for this run
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: autotest_prs | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - name: Setting up Go 1.24 | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: ^1.24 | |
| id: go | |
| - name: Checking out DTS | |
| uses: actions/checkout@v5 | |
| - name: Vetting DTS | |
| run: go vet -v ./... | |
| - name: Static Analysis | |
| run: | | |
| go install honnef.co/go/tools/cmd/staticcheck@latest | |
| staticcheck ./... | |
| - name: Set up MinIO | |
| uses: infleet/minio-action@v0.0.1 | |
| with: | |
| port: "9000" | |
| version: "latest" | |
| username: "minioadmin" | |
| password: "minioadmin" | |
| - name: Building DTS | |
| run: go build -v ./... | |
| - name: Testing DTS against real services | |
| id: test | |
| if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository | |
| shell: bash | |
| env: | |
| DTS_KBASE_DEV_TOKEN: ${{ secrets.DTS_KBASE_DEV_TOKEN }} | |
| DTS_KBASE_TEST_ORCID: ${{ secrets.DTS_KBASE_TEST_ORCID }} | |
| DTS_KBASE_TEST_USER: ${{ secrets.DTS_KBASE_TEST_USER }} | |
| DTS_GLOBUS_CLIENT_ID: ${{ secrets.DTS_GLOBUS_CLIENT_ID }} | |
| DTS_GLOBUS_CLIENT_SECRET: ${{ secrets.DTS_GLOBUS_CLIENT_SECRET }} | |
| DTS_GLOBUS_TEST_ENDPOINT: ${{ secrets.DTS_GLOBUS_TEST_ENDPOINT }} | |
| DTS_JDP_SECRET: ${{ secrets.DTS_JDP_SECRET }} | |
| DTS_NMDC_USER: ${{ secrets.DTS_NMDC_USER }} | |
| DTS_NMDC_PASSWORD: ${{ secrets.DTS_NMDC_PASSWORD }} | |
| run: | | |
| PACKAGES=$(go list ./... | grep -v /integration) | |
| go test $PACKAGES -coverprofile=coverage.out -covermode=atomic | |
| - name: Testing DTS against mock services | |
| id: test-mock | |
| shell: bash | |
| env: | |
| DTS_TEST_WITH_MOCK_SERVICES: true | |
| run: | | |
| go test ./... -coverprofile=coverage_mock.out -covermode=atomic | |
| - name: Run AWS example script # example script for using the aws go sdk | |
| shell: bash | |
| working-directory: ./etc/aws_client | |
| run: | | |
| go run ./... | |
| - name: Uploading code coverage report to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: coverage.out,coverage_mock.out | |
| - name: Fail if tests failed | |
| if: steps.test.outcome == 'failure' || steps.test-mock.outcome == 'failure' | |
| run: exit 1 | |