cal.pub0.org/.github/workflows/pr.yml

80 lines
1.7 KiB
YAML
Raw Normal View History

2023-02-18 02:13:25 +00:00
name: PR Update
on:
2023-02-18 03:12:19 +00:00
push:
2023-02-21 04:02:39 +00:00
pull_request_target:
branches:
- main
2023-02-18 02:13:25 +00:00
workflow_dispatch:
concurrency:
2023-02-21 03:26:38 +00:00
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
2023-02-18 02:13:25 +00:00
cancel-in-progress: true
jobs:
2023-02-21 04:02:39 +00:00
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
app-store: ${{ steps.filter.outputs.app-store }}
embed: ${{ steps.filter.outputs.embed }}
steps:
2023-02-21 04:05:01 +00:00
- uses: actions/checkout@v2
- uses: ./.github/actions/dangerous-git-checkout
2023-02-21 04:02:39 +00:00
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
app-store:
- 'apps/web/**'
- 'packages/app-store/**'
embed:
- 'apps/web/**'
- 'packages/embeds/**'
2023-02-18 02:13:25 +00:00
setup:
name: Yarn install & cache
2023-02-18 03:12:50 +00:00
uses: ./.github/workflows/yarn-install.yml
2023-02-18 03:12:06 +00:00
2023-02-20 23:02:05 +00:00
type-check:
2023-02-20 23:00:49 +00:00
name: Type check
needs: setup
2023-02-21 03:26:38 +00:00
uses: ./.github/workflows/check-types.yml
2023-02-20 23:00:49 +00:00
2023-02-21 04:47:01 +00:00
test:
2023-02-21 17:36:59 +00:00
name: Unit tests
2023-02-21 04:47:01 +00:00
needs: setup
uses: ./.github/workflows/test.yml
2023-02-18 02:13:25 +00:00
lint:
name: Linters
needs: setup
2023-02-21 03:26:38 +00:00
uses: ./.github/workflows/lint.yml
2023-02-20 22:04:03 +00:00
2023-02-18 02:13:25 +00:00
build:
name: Production build
needs: setup
2023-02-18 02:55:47 +00:00
uses: ./.github/workflows/production-build.yml
2023-02-18 02:13:25 +00:00
2023-02-21 04:02:39 +00:00
e2e:
2023-02-18 02:13:25 +00:00
name: E2E tests
2023-02-18 03:12:06 +00:00
needs: [lint, build]
2023-02-21 03:26:38 +00:00
uses: ./.github/workflows/e2e.yml
2023-02-18 22:32:16 +00:00
2023-02-21 04:02:39 +00:00
e2e-app-store:
name: E2E App Store tests
if: ${{ needs.changes.outputs.app-store == 'true' }}
needs: [changes, lint, build]
uses: ./.github/workflows/e2e-app-store.yml
e2e-embed:
name: E2E embeds tests
if: ${{ needs.changes.outputs.embed == 'true' }}
needs: [changes, lint, build]
uses: ./.github/workflows/e2e.yml
2023-02-18 17:11:02 +00:00
analyze:
needs: build
2023-02-21 03:26:38 +00:00
uses: ./.github/workflows/nextjs-bundle-analysis.yml