ci: skip cypress if no code changes (#12982)
This commit is contained in:
parent
9cd01656db
commit
b12e8024b3
|
|
@ -56,47 +56,63 @@ jobs:
|
||||||
ref: "refs/pull/${{ github.event.number }}/merge"
|
ref: "refs/pull/${{ github.event.number }}/merge"
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
- name: Check if python or frontend changes are present
|
||||||
|
id: check
|
||||||
|
env:
|
||||||
|
GITHUB_REPO: ${{ github.repository }}
|
||||||
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||||
|
continue-on-error: true
|
||||||
|
run: ./scripts/ci_check_no_file_changes.sh python frontend
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
|
if: steps.check.outcome == 'failure'
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: "3.7"
|
python-version: "3.7"
|
||||||
- name: OS dependencies
|
- name: OS dependencies
|
||||||
|
if: steps.check.outcome == 'failure'
|
||||||
uses: ./.github/actions/cached-dependencies
|
uses: ./.github/actions/cached-dependencies
|
||||||
with:
|
with:
|
||||||
run: |
|
run: |
|
||||||
apt-get-install
|
apt-get-install
|
||||||
- name: Install python dependencies
|
- name: Install python dependencies
|
||||||
|
if: steps.check.outcome == 'failure'
|
||||||
uses: ./.github/actions/cached-dependencies
|
uses: ./.github/actions/cached-dependencies
|
||||||
with:
|
with:
|
||||||
run: |
|
run: |
|
||||||
pip-upgrade
|
pip-upgrade
|
||||||
pip install -r requirements/testing.txt
|
pip install -r requirements/testing.txt
|
||||||
- name: Setup postgres
|
- name: Setup postgres
|
||||||
|
if: steps.check.outcome == 'failure'
|
||||||
uses: ./.github/actions/cached-dependencies
|
uses: ./.github/actions/cached-dependencies
|
||||||
with:
|
with:
|
||||||
run: |
|
run: |
|
||||||
setup-postgres
|
setup-postgres
|
||||||
- name: Import test data
|
- name: Import test data
|
||||||
|
if: steps.check.outcome == 'failure'
|
||||||
uses: ./.github/actions/cached-dependencies
|
uses: ./.github/actions/cached-dependencies
|
||||||
with:
|
with:
|
||||||
run: |
|
run: |
|
||||||
testdata
|
testdata
|
||||||
- name: Install npm dependencies
|
- name: Install npm dependencies
|
||||||
|
if: steps.check.outcome == 'failure'
|
||||||
uses: ./.github/actions/cached-dependencies
|
uses: ./.github/actions/cached-dependencies
|
||||||
with:
|
with:
|
||||||
run: |
|
run: |
|
||||||
npm-install
|
npm-install
|
||||||
- name: Build javascript packages
|
- name: Build javascript packages
|
||||||
|
if: steps.check.outcome == 'failure'
|
||||||
uses: ./.github/actions/cached-dependencies
|
uses: ./.github/actions/cached-dependencies
|
||||||
with:
|
with:
|
||||||
run: |
|
run: |
|
||||||
build-instrumented-assets
|
build-instrumented-assets
|
||||||
- name: Install cypress
|
- name: Install cypress
|
||||||
|
if: steps.check.outcome == 'failure'
|
||||||
uses: ./.github/actions/cached-dependencies
|
uses: ./.github/actions/cached-dependencies
|
||||||
with:
|
with:
|
||||||
run: |
|
run: |
|
||||||
cypress-install
|
cypress-install
|
||||||
- name: Run Cypress
|
- name: Run Cypress
|
||||||
|
if: steps.check.outcome == 'failure'
|
||||||
uses: ./.github/actions/cached-dependencies
|
uses: ./.github/actions/cached-dependencies
|
||||||
env:
|
env:
|
||||||
CYPRESS_BROWSER: ${{ matrix.browser }}
|
CYPRESS_BROWSER: ${{ matrix.browser }}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue