Storefront: Improve trackable. #8662
This file contains 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: | |
pull_request: | |
push: | |
branches: | |
- master | |
- staging | |
- 'dev/*' | |
- 'fix/*' | |
paths-ignore: | |
- '**.md' | |
- '**.txt' | |
- 'LICENSE' | |
env: | |
CI: true | |
MONGODB_URI: ${{ secrets.MONGODB_URI }} | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: ${{ vars.TURBO_TEAM }} | |
SHOPIFY_API_KEY: ${{ secrets.SHOPIFY_API_KEY }} | |
SHOPIFY_API_SECRET_KEY: ${{ secrets.SHOPIFY_API_SECRET_KEY }} | |
AUTH_SECRET: 'development-secret' | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: ${{ vars.SENTRY_ORG }} | |
SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }} | |
MONGODB_DATA_API_TOKEN: ${{ secrets.MONGODB_DATA_API_TOKEN }} | |
MONGODB_DATA_API_URI: ${{ secrets.MONGODB_DATA_API_URI }} | |
EDGE_CONFIG: ${{ secrets.EDGE_CONFIG }} | |
jobs: | |
build: | |
name: π¨ Build | |
needs: [lint, typecheck] | |
timeout-minutes: 25 | |
runs-on: ubuntu-latest | |
steps: | |
- name: πΆοΈ Checkout repository | |
uses: actions/checkout@v4 | |
- name: π Bootstrap | |
uses: ./.github/common/bootstrap | |
- name: π¨ Build All | |
run: pnpm run build | |
test: | |
name: π§ͺ Test | |
needs: [lint, typecheck] | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
steps: | |
- name: πΆοΈ Checkout repository | |
uses: actions/checkout@v4 | |
- name: π Bootstrap | |
uses: ./.github/common/bootstrap | |
- name: π¨ Build Packages | |
run: pnpm run build:packages | |
- name: π§ͺ Test | |
run: pnpm run test | |
- name: π¦Ί Report Coverage to GitHub | |
if: ${{ !cancelled() }} | |
uses: davelosert/[email protected] | |
- name: π¦Ί Codecov Coverage Reports | |
if: ${{ !cancelled() }} | |
uses: codecov/codecov-action@v4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
- name: π¦Ί Codecov Test Results | |
if: ${{ !cancelled() }} | |
uses: codecov/test-results-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
lint: | |
name: π Lint | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
steps: | |
- name: πΆοΈ Checkout repository | |
uses: actions/checkout@v4 | |
- name: π Bootstrap | |
uses: ./.github/common/bootstrap | |
- name: π¨ Build Packages | |
run: pnpm run build:packages | |
- name: π Lint | |
run: pnpm run lint | |
typecheck: | |
name: β Typecheck | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
steps: | |
- name: πΆοΈ Checkout repository | |
uses: actions/checkout@v4 | |
- name: π Bootstrap | |
uses: ./.github/common/bootstrap | |
- name: π¨ Build Packages | |
run: pnpm run build:packages | |
- name: β Typecheck | |
run: pnpm run typecheck | |
dispatch: | |
name: π£οΈ Dispatch | |
needs: [build, test] | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
steps: | |
- name: πΆοΈ Checkout repository | |
uses: actions/checkout@v4 | |
# Deliberately empty as this is just used | |
# to trigger other workflows when this one | |
# completes successfully. Otherwise we can't | |
# make sure that every test, lint and typecheck | |
# job has validated and completed successfully. |