Repository navigation
chore(deps): update dependency @actions/tool-cache to v2.0.2 #758
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: CI | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }} | |
| ref: ${{ github.event.pull_request.head.sha || github.sha }} | |
| persist-credentials: false | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: package.json | |
| cache: yarn | |
| - name: Install Dependencies | |
| run: yarn --frozen-lockfile --prefer-offline | |
| - name: Linting | |
| run: yarn lint:check | |
| - name: Format Source Code | |
| run: yarn format:check | |
| - name: Unit Tests | |
| run: yarn test:coverage | |
| - name: Build | |
| run: | | |
| yarn clean | |
| yarn build | |
| yarn build:wrapper | |
| - name: Verify build artifacts are committed | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| if ! git diff --quiet -- dist; then | |
| echo "::error::Generated dist artifacts are stale. Run 'yarn clean && yarn build && yarn build:wrapper' and commit dist/." | |
| git diff --name-only -- dist | |
| exit 1 | |
| fi | |
| - name: Commit and push generated build artifacts | |
| if: github.event_name != 'pull_request' && github.ref_type == 'branch' | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| run: | | |
| if git diff --quiet -- dist; then | |
| echo "No generated build artifact changes." | |
| exit 0 | |
| fi | |
| git config user.name "GitHub Action" | |
| git config user.email "actions@github.com" | |
| git add dist | |
| git commit -m "chore: [skip-ci] generate build artifacts" | |
| auth_header="$(printf 'x-access-token:%s' "$GITHUB_TOKEN" | base64 | tr -d '\n')" | |
| git -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth_header}" push origin "HEAD:${GITHUB_REF_NAME}" | |
| integration: | |
| name: Integration (${{ matrix.os }}, wrapper=${{ matrix.install-wrapper }}) | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| - windows-latest | |
| install-wrapper: | |
| - "false" | |
| - "true" | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }} | |
| ref: ${{ github.event.pull_request.head.sha || github.sha }} | |
| persist-credentials: false | |
| - name: Setup Atmos | |
| uses: ./ | |
| with: | |
| atmos-version: latest | |
| install-wrapper: ${{ matrix.install-wrapper }} | |
| - name: Run Atmos | |
| id: atmos | |
| run: atmos version | |
| - name: Verify outputs are available | |
| if: matrix.install-wrapper == 'true' | |
| env: | |
| ATMOS_STDOUT: ${{ steps.atmos.outputs.stdout }} | |
| ATMOS_STDERR: ${{ steps.atmos.outputs.stderr }} | |
| ATMOS_EXITCODE: ${{ steps.atmos.outputs.exitcode }} | |
| shell: bash | |
| run: | | |
| printf 'stdout: %s\n' "$ATMOS_STDOUT" | |
| printf 'stderr: %s\n' "$ATMOS_STDERR" | |
| printf 'exitcode: %s\n' "$ATMOS_EXITCODE" | |
| major-release-tagger: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: cloudposse/github-action-major-release-tagger@v2 | |
| with: | |
| dry-run: 'true' |