Fork Sync: Update from parent repository #72
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: Frontend | |
on: | |
push: | |
branches: | |
- "master" | |
- "release-**" | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
files-changed: | |
name: Check which files changed | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 3 | |
outputs: | |
frontend_all: ${{ steps.changes.outputs.frontend_all }} | |
e2e_specs: ${{ steps.changes.outputs.e2e_specs }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Test which files changed | |
uses: dorny/[email protected] | |
id: changes | |
with: | |
token: ${{ github.token }} | |
filters: .github/file-paths.yaml | |
fe-lint: | |
needs: files-changed | |
if: needs.files-changed.outputs.frontend_all == 'true' || needs.files-changed.outputs.e2e_specs == 'true' | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Prepare front-end environment | |
uses: ./.github/actions/prepare-frontend | |
- name: Prepare back-end environment | |
uses: ./.github/actions/prepare-backend | |
with: | |
m2-cache-key: "cljs" | |
- name: Compile CLJS | |
run: yarn build-pure:cljs | |
- name: Run Prettier formatting linter | |
run: yarn run lint-prettier-pure | |
- name: Run ESLint linter | |
run: yarn run lint-eslint-pure | |
fe-type-check: | |
needs: files-changed | |
if: needs.files-changed.outputs.frontend_all == 'true' | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Prepare front-end environment | |
uses: ./.github/actions/prepare-frontend | |
- name: Prepare back-end environment | |
uses: ./.github/actions/prepare-backend | |
with: | |
m2-cache-key: "cljs" | |
- run: yarn build-pure:cljs | |
name: Compile CLJS | |
- run: yarn type-check-pure | |
name: Check types | |
fe-tests-unit: | |
needs: files-changed | |
if: github.event.pull_request.draft == false && needs.files-changed.outputs.frontend_all == 'true' | |
runs-on: buildjet-2vcpu-ubuntu-2204 | |
timeout-minutes: 60 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Prepare front-end environment | |
uses: ./.github/actions/prepare-frontend | |
- name: Prepare back-end environment | |
uses: ./.github/actions/prepare-backend | |
with: | |
m2-cache-key: "cljs" | |
- name: Run frontend unit tests and collect the code coverage information | |
if: github.ref_name == 'master' | |
run: yarn run test-unit --coverage --silent | |
- name: Run frontend unit tests | |
if: github.ref_name != 'master' | |
run: yarn run test-unit --silent | |
- name: Upload coverage to codecov.io | |
if: github.ref_name == 'master' | |
uses: codecov/codecov-action@v3 | |
with: | |
files: ./coverage/lcov.info | |
flags: front-end | |
fe-tests-timezones: | |
needs: files-changed | |
if: github.event.pull_request.draft == false && needs.files-changed.outputs.frontend_all == 'true' | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Prepare front-end environment | |
uses: ./.github/actions/prepare-frontend | |
- name: Prepare back-end environment | |
uses: ./.github/actions/prepare-backend | |
with: | |
m2-cache-key: "cljs" | |
- name: Run frontend timezones tests | |
run: yarn run test-timezones |