diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dbc50221d..11dbed79b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,42 +10,55 @@ concurrency: group: ci-${{ github.ref }} cancel-in-progress: true +env: + ARTIFACTORY_URL: ${{ vars.ARTIFACTORY_URL }} + jobs: ci: name: Lint + Build + Test runs-on: ubuntu-latest + permissions: + contents: read + id-token: write steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - - name: Install devbox - uses: jetify-com/devbox-install-action@a0d2d53632934ae004f878c840055956d9f741b0 # v0.14.0 - - name: Route Nix/devbox packages through Artifactory - uses: ./.github/actions/devbox-artifactory-cache + - name: Artifactory OIDC Auth + uses: ./.github/actions/artifactory-oidc + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 + with: + node-version: 22 + - run: corepack enable - name: Install dependencies - run: devbox run ci:install + run: yarn install --immutable - name: Lint (eslint) - run: devbox run lint + run: yarn lint - name: Lint (formatting) - run: devbox run format-check + run: yarn format:check - name: Build - run: devbox run build + run: yarn build - name: Typecheck - run: devbox run typecheck + run: yarn typecheck - name: Test - run: devbox run test + run: yarn test commitlint: name: Commitlint if: github.event_name == 'pull_request' runs-on: ubuntu-latest + permissions: + contents: read + id-token: write steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - - name: Install devbox - uses: jetify-com/devbox-install-action@a0d2d53632934ae004f878c840055956d9f741b0 # v0.14.0 - - name: Route Nix/devbox packages through Artifactory - uses: ./.github/actions/devbox-artifactory-cache + - name: Artifactory OIDC Auth + uses: ./.github/actions/artifactory-oidc + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 + with: + node-version: 22 + - run: corepack enable - name: Install dependencies - run: devbox run ci:install + run: yarn install --immutable - name: Validate PR title - run: devbox run ci:commitlint + run: echo "$PR_TITLE" | yarn commitlint env: PR_TITLE: ${{ github.event.pull_request.title }} diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 2aac6a64e..7dac486d8 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -8,11 +8,10 @@ name: E2E Tests +# Push/pull_request triggers disabled for now - runs have been stuck queued +# (not a code/action problem here specifically, unlike ci.yml's devbox +# startup_failure). Re-enable once confirmed healthy. on: - push: - branches: [main, master] - pull_request: - branches: [main, master] workflow_dispatch: inputs: e2e_tests_ref: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ee7221fed..a26a70701 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,22 +30,22 @@ jobs: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - name: Artifactory OIDC Auth uses: ./.github/actions/artifactory-oidc - - name: Install devbox - uses: jetify-com/devbox-install-action@a0d2d53632934ae004f878c840055956d9f741b0 # v0.14.0 - - name: Route Nix/devbox packages through Artifactory - uses: ./.github/actions/devbox-artifactory-cache + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 + with: + node-version: 22 + - run: corepack enable - name: Install dependencies - run: devbox run ci:install + run: yarn install --immutable - name: Lint (eslint) - run: devbox run lint + run: yarn lint - name: Lint (formatting) - run: devbox run format-check + run: yarn format:check - name: Build - run: devbox run build + run: yarn build - name: Typecheck - run: devbox run typecheck + run: yarn typecheck - name: Test - run: devbox run test + run: yarn test release-dryrun: name: Release (dry-run) @@ -66,13 +66,16 @@ jobs: - name: Artifactory OIDC Auth uses: ./.github/actions/artifactory-oidc - - name: Install devbox - uses: jetify-com/devbox-install-action@a0d2d53632934ae004f878c840055956d9f741b0 # v0.14.0 - - name: Route Nix/devbox packages through Artifactory - uses: ./.github/actions/devbox-artifactory-cache + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 + with: + node-version: 22 + - run: corepack enable - name: Release (dry-run) - run: devbox run release-dry-run + run: | + yarn install --immutable + yarn build + yarn multi-semantic-release --dry-run env: GH_TOKEN: ${{ github.token }} @@ -96,17 +99,19 @@ jobs: - name: Artifactory OIDC Auth uses: ./.github/actions/artifactory-oidc - - name: Install devbox - uses: jetify-com/devbox-install-action@a0d2d53632934ae004f878c840055956d9f741b0 # v0.14.0 - - name: Route Nix/devbox packages through Artifactory - uses: ./.github/actions/devbox-artifactory-cache + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 + with: + node-version: 22 + - run: corepack enable - name: Release (beta) run: | - BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) - devbox run -e GITHUB_REF=refs/heads/$BRANCH_NAME release + yarn install --immutable + yarn build + yarn release env: GH_TOKEN: ${{ github.token }} + GITHUB_REF: refs/heads/${{ github.ref_name }} NPM_CONFIG_IGNORE_SCRIPTS: 'true' release-production: @@ -129,16 +134,21 @@ jobs: - name: Artifactory OIDC Auth uses: ./.github/actions/artifactory-oidc - - name: Install devbox - uses: jetify-com/devbox-install-action@a0d2d53632934ae004f878c840055956d9f741b0 # v0.14.0 - - name: Route Nix/devbox packages through Artifactory - uses: ./.github/actions/devbox-artifactory-cache + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 + with: + node-version: 22 + - run: corepack enable - name: Release (production) - run: devbox run release + run: | + yarn install --immutable + yarn build + yarn release env: GH_TOKEN: ${{ github.token }} NPM_CONFIG_IGNORE_SCRIPTS: 'true' - name: Update Apps - run: devbox run update-apps + run: | + yarn install --no-immutable + yarn --cwd examples/AnalyticsReactNativeExample install --no-immutable