mirror of
https://github.com/directus/directus.git
synced 2026-01-28 16:48:02 -05:00
67 lines
2.0 KiB
YAML
67 lines
2.0 KiB
YAML
# ### Continuous Integration
|
|
#
|
|
# Entrypoint for all CI related workflows
|
|
#
|
|
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
# Check whether workflow is skippable
|
|
pre_check:
|
|
name: Pre-Check
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
# Returns 'true' if workflow is skippable for one of the following reasons:
|
|
# - Exact same files have been successfully checked in older workflow run
|
|
# - Only files that do not require checks (paths_ignore) have been changed and
|
|
# workflow run on previous commit has been successful (backtracking)
|
|
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
|
steps:
|
|
- name: Check whether workflow is skippable
|
|
id: skip_check
|
|
uses: fkirc/skip-duplicate-actions@master
|
|
# Run all the jobs if the pre-check should fail for any reason
|
|
# (setting this on step-level makes sure the pre-check will still be marked as 'passed',
|
|
# better solution pending at https://github.com/actions/toolkit/issues/399)
|
|
continue-on-error: true
|
|
with:
|
|
# Cancel outdated workflow runs
|
|
cancel_others: 'true'
|
|
# Ignore changes in the following files
|
|
paths_ignore: '["app/src/lang/translations/*.yaml"]'
|
|
|
|
lint:
|
|
name: Lint
|
|
needs: pre_check
|
|
uses: directus/directus/.github/workflows/lint.yml@main
|
|
with:
|
|
should_skip: ${{ needs.pre_check.outputs.should_skip }}
|
|
|
|
codeql_analysis:
|
|
name: CodeQL Analysis
|
|
needs: pre_check
|
|
uses: directus/directus/.github/workflows/codeql-analysis.yml@main
|
|
with:
|
|
should_skip: ${{ needs.pre_check.outputs.should_skip }}
|
|
|
|
unit_tests:
|
|
name: Unit Tests
|
|
needs: pre_check
|
|
uses: directus/directus/.github/workflows/unit-tests.yml@main
|
|
with:
|
|
should_skip: ${{ needs.pre_check.outputs.should_skip }}
|
|
|
|
e2e_tests:
|
|
name: End-to-End Tests
|
|
needs: pre_check
|
|
uses: directus/directus/.github/workflows/e2e-tests.yml@main
|
|
with:
|
|
should_skip: ${{ needs.pre_check.outputs.should_skip }}
|