Skip to content

Commit 16ab132

Browse files
author
Christopher Farrenden
authored
Allow workflows to be ran from forked repositories (#180)
* Empty commit * Allow drafts * Not needed for this check * Check payload * Try and disable forks * Enable forks * Try rest of the workflows * Remove debugging
1 parent 66322e2 commit 16ab132

File tree

1 file changed

+42
-2
lines changed

1 file changed

+42
-2
lines changed

.github/workflows/on-pull-request.yml

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
- '*.*'
1212

1313
jobs:
14-
pytest:
14+
check-dependencies:
1515
# Filter out Draft Pull Requests
1616
if: github.event.pull_request.draft == false
1717
runs-on: ubuntu-latest
@@ -20,6 +20,46 @@ jobs:
2020
- name: Ensure no development packages have been set
2121
run: |
2222
source <(curl -sL http://ci.q-ctrl.com)
23-
./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }}
2423
./ci docker run qctrl/python-build:3.7 /scripts/check-for-internal-versions.sh
24+
linting:
25+
# Filter out PRs originating from this repository (triggers on-push.yml instead)
26+
if: github.event.pull_request.head.repo.fork == true
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v1
30+
- name: Install Python dependencies
31+
run: |
32+
source <(curl -sL http://ci.q-ctrl.com)
33+
./ci docker run qctrl/ci-images:python-3.7-ci /scripts/install-python-dependencies.sh
34+
- name: Run Pre-Commit
35+
run: |
36+
./ci docker run qctrl/ci-images:python-3.7-ci poetry run pre-commit run -- -a
37+
pytest:
38+
# Filter out PRs originating from this repository (triggers on-push.yml instead)
39+
if: github.event.pull_request.head.repo.fork == true
40+
runs-on: ubuntu-latest
41+
strategy:
42+
matrix:
43+
python: [3.6, 3.7, 3.8]
44+
steps:
45+
- uses: actions/checkout@v1
46+
- name: Install Python dependencies
47+
run: |
48+
source <(curl -sL http://ci.q-ctrl.com)
49+
./ci docker run qctrl/python-build:${{ matrix.python }} /scripts/install-python-dependencies.sh
50+
- name: Run Pytest
51+
run: |
52+
./ci docker run qctrl/python-build:${{ matrix.python }} /scripts/pytest.sh
53+
sphinx_documentation:
54+
# Filter out PRs originating from this repository (triggers on-push.yml instead)
55+
if: github.event.pull_request.head.repo.fork == true
56+
runs-on: ubuntu-latest
57+
steps:
58+
- uses: actions/checkout@v2
59+
- name: Build Sphinx Image
60+
run: |
61+
source <(curl -sL http://ci.q-ctrl.com)
62+
./ci docker build \
63+
-f ./docs/Dockerfile \
64+
--suffix -docs
2565
#################### Maintained by repositories-manager - do not edit directly ####################

0 commit comments

Comments
 (0)