-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update RTD config, move doc deps into their own group, update dev gro…
…up (#2381) * update RTD config, move doc deps into their own group, update dev group * remove use of `--extras docs` from gh actions * better filter when functional tests run by add an `info` job this new job produces outputs that can be used by other jobs to determine if they should run or not making it easier to skip jobs on/from forks that can't run on/from forks. * Spell Check workflow trigger match CI/CD workflow trigger the PR for this change is stuck waiting for the "Spell Check" workflow to run. this could be caused by the trigger only being defined for pushed events and this being from a fork where actions don't run. * remove `.` from workflow name
- Loading branch information
Showing
9 changed files
with
104 additions
and
78 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,13 +48,41 @@ jobs: | |
- 'infrastructure/blueprints/prevent_privilege_escalation.py' | ||
- 'infrastructure/blueprints/test_runner_boundary.py' | ||
- 'infrastructure/test-alt/common/**' | ||
info: | ||
name: Output useful information | ||
runs-on: ubuntu-latest | ||
outputs: | ||
is-actor-bot: ${{ steps.gh-context.outputs.is-actor-bot }} # if the actor (user) is a bot | ||
is-fork: ${{ steps.gh-context.outputs.is-fork }} # if the action is running in or from (PR) a fork | ||
repo-head: ${{ steps.gh-context.outputs.repo-head }} # repo where change occurred | ||
repo-origin: ${{ steps.gh-context.outputs.repo-origin }} # origin of codebase | ||
steps: | ||
- name: Output GitHub Context | ||
id: gh-context | ||
run: | | ||
export _REPO_ORIGIN="onicagroup/runway"; | ||
echo "repo-origin=${_REPO_ORIGIN}" >> "${GITHUB_OUTPUT}"; | ||
export _REPO_HEAD="${{ github.event.pull_request.head.repo.full_name || github.repository }}"; | ||
echo "repo-head=${_REPO_HEAD}" >> "${GITHUB_OUTPUT}"; | ||
if [[ "${_REPO_HEAD}" == "${_REPO_ORIGIN}" ]]; then | ||
echo "is-fork=false" >> "${GITHUB_OUTPUT}"; | ||
else | ||
echo "is-fork=true" >> "${GITHUB_OUTPUT}"; | ||
fi; | ||
if [[ ${{ github.actor }} == *"[bot]" ]]; then | ||
echo "is-actor-bot=true" >> "${GITHUB_OUTPUT}"; | ||
else | ||
echo "is-actor-bot=false" >> "${GITHUB_OUTPUT}"; | ||
fi; | ||
deploy-test-infrastructure: | ||
name: Deploy Test Infrastructure | ||
environment: test | ||
concurrency: test-infrastructure | ||
needs: changes | ||
needs: | ||
- changes | ||
- info | ||
if: | | ||
github.repository == 'onicagroup/runway' && | ||
needs.info.outputs.is-fork == 'false' && | ||
(needs.changes.outputs.infra-test == 'true' || needs.changes.outputs.infra-test-alt == 'true') | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -73,7 +101,7 @@ jobs: | |
- name: Ensure Cache Is Healthy | ||
if: runner.os != 'Windows' && steps.cache.outputs.cache-hit == 'true' | ||
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv | ||
- run: poetry install --extras docs -vv | ||
- run: poetry install -vv | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
|
@@ -115,7 +143,7 @@ jobs: | |
- name: Ensure Cache Is Healthy | ||
if: runner.os != 'Windows' && steps.cache.outputs.cache-hit == 'true' | ||
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv | ||
- run: poetry install --extras docs -vv | ||
- run: poetry install -vv | ||
- name: Install Node Dependencies | ||
run: make npm-ci | ||
- name: Run Linters | ||
|
@@ -141,16 +169,17 @@ jobs: | |
- name: Ensure Cache Is Healthy | ||
if: runner.os != 'Windows' && steps.cache.outputs.cache-hit == 'true' | ||
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv | ||
- run: poetry install --extras docs -vv | ||
- run: poetry install -vv | ||
- uses: pre-commit/[email protected] | ||
test-functional: | ||
name: Functional Tests | ||
needs: deploy-test-infrastructure | ||
# will fail if run from forks | ||
needs: | ||
- deploy-test-infrastructure | ||
- info | ||
if: | | ||
always() && | ||
github.repository == 'onicagroup/runway' && | ||
github.actor != 'dependabot[bot]' && | ||
needs.info.outputs.is-fork == 'false' && | ||
needs.info.outputs.is-actor-bot == 'false' && | ||
(needs.deploy-test-infrastructure.result == 'success' || needs.deploy-test-infrastructure.result == 'skipped') | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -172,7 +201,7 @@ jobs: | |
- name: Ensure Cache Is Healthy | ||
if: runner.os != 'Windows' && steps.cache.outputs.cache-hit == 'true' | ||
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv | ||
- run: poetry install --extras docs -vv | ||
- run: poetry install -vv | ||
- name: Install Ubuntu Dependencies | ||
run: | | ||
sudo apt update -y | ||
|
@@ -218,7 +247,7 @@ jobs: | |
- name: Ensure Cache Is Healthy | ||
if: steps.cache.outputs.cache-hit == 'true' | ||
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv | ||
- run: poetry install --extras docs -vv | ||
- run: poetry install -vv | ||
- name: Install Node Dependencies | ||
run: make npm-install | ||
- name: Configure Pagefile # avoid MemoryError during tests | ||
|
@@ -266,7 +295,7 @@ jobs: | |
- name: Ensure Cache Is Healthy | ||
if: runner.os != 'Windows' && steps.cache.outputs.cache-hit == 'true' | ||
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv | ||
- run: poetry install --extras docs -vv | ||
- run: poetry install -vv | ||
- name: Run Build | ||
run: make build | ||
- name: Upload Distribution Artifact | ||
|
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
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
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
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
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
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
Oops, something went wrong.