Skip to content

Commit

Permalink
new-runners
Browse files Browse the repository at this point in the history
  • Loading branch information
jablonnc committed Oct 19, 2023
1 parent ec33c97 commit 74bd950
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
1 change: 1 addition & 0 deletions .github/actions/frontend/runtime/e2e_run/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ runs:
continue-on-error: ${{ fromJSON(inputs.e2e_pass_on_error) }}
uses: cypress-io/github-action@v5
with:
install: false
record: true
parallel: true
group: PR
Expand Down
6 changes: 5 additions & 1 deletion .github/actions/setup_env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,21 @@ runs:
- name: setup_node
uses: actions/setup-node@v3
with:
node-version: 18.15.0
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
- name: npm_install_prod_deps
if: ${{ fromJSON(inputs.use_dev) }}
run: npm ci --ignore-scripts
shell: bash
env:
NODE_AUTH_TOKEN: ${{ env.NODE_AUTH_TOKEN }}
- name: npm_install_prod_and_dev_deps
if: ${{ !fromJSON(inputs.use_dev)}}
run: npm ci --ignore-scripts --omit=dev
shell: bash
env:
NODE_AUTH_TOKEN: ${{ env.NODE_AUTH_TOKEN }}
- name: npm_rebuild
run: npm rebuild && npm run prepare --if-present
shell: bash

Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ graph LR;
```yaml
jobs:
pr:
uses: jupiterone/.github/.github/workflows/frontend_runtime_application_pr.yml@main
uses: jupiterone/.github/.github/workflows/frontend_runtime_utility_pr.yml@main
with:
use_chromatic: true
secrets:
Expand Down
22 changes: 12 additions & 10 deletions .github/workflows/frontend_runtime_application_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ permissions:

jobs:
migration_number:
runs-on: ${{ (inputs.fallback_runner && 'ubuntu-latest') || fromJson('["jupiterone-dev", "arm64"]') }}
runs-on: ${{ (inputs.fallback_runner && 'ubuntu-latest') || 'scaleset-jupiterone-infra-arm64' }}
outputs:
migration: ${{ steps.migration_number.outputs.migration }}
steps:
Expand All @@ -88,7 +88,7 @@ jobs:
validate:
# Name targeted by branch protections, do not change
name: Validate
runs-on: ${{ (inputs.fallback_runner && 'ubuntu-latest') || fromJson('["jupiterone-dev", "arm64"]') }}
runs-on: ${{ (inputs.fallback_runner && 'ubuntu-latest') || 'scaleset-jupiterone-infra-arm64' }}
if: ${{ inputs.use_validate }}
steps:
- uses: actions/checkout@v3
Expand All @@ -106,7 +106,7 @@ jobs:
uses: jupiterone/.github/.github/actions/build@main

security:
runs-on: ${{ (inputs.fallback_runner && 'ubuntu-latest') || fromJson('["jupiterone-dev", "amd64"]') }}
runs-on: ${{ (inputs.fallback_runner && 'ubuntu-latest') || 'scaleset-jupiterone-infra-amd64' }}
steps:
- uses: actions/checkout@v3
- name: code_ql
Expand All @@ -117,7 +117,7 @@ jobs:
chromatic_upload:
# Name targeted by branch protections, do not change
name: Visual Regression
runs-on: ${{ (inputs.fallback_runner && 'ubuntu-latest') || fromJson('["jupiterone-dev", "arm64"]') }}
runs-on: ${{ (inputs.fallback_runner && 'ubuntu-latest') || 'scaleset-jupiterone-infra-arm64' }}
if: ${{ inputs.use_chromatic }}
steps:
- uses: actions/checkout@v3
Expand All @@ -134,7 +134,7 @@ jobs:
chromatic_project_token: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}

magic_url:
runs-on: ${{ (inputs.fallback_runner && 'ubuntu-latest') || fromJson('["jupiterone-dev", "arm64"]') }}
runs-on: ${{ (inputs.fallback_runner && 'ubuntu-latest') || 'scaleset-jupiterone-infra-arm64' }}
needs: [migration_number]
steps:
- uses: actions/checkout@v3
Expand All @@ -152,7 +152,7 @@ jobs:
magic_url_route: ${{ inputs.magic_url_route }}

e2e_prepare:
runs-on: ${{ (inputs.fallback_runner && 'ubuntu-latest') || fromJson('["jupiterone-dev", "arm64"]') }}
runs-on: ${{ (inputs.fallback_runner && 'ubuntu-latest') || 'scaleset-jupiterone-infra-arm64' }}
needs: [migration_number]
if: ${{ inputs.use_e2e }}
outputs:
Expand All @@ -175,8 +175,11 @@ jobs:

e2e_run:
# Note this is the only job that leverages amd64
runs-on: ${{ (inputs.fallback_runner && 'ubuntu-latest') || fromJson('["jupiterone-dev", "amd64"]') }}
container: cypress/browsers:node18.12.0-chrome106-ff106
runs-on: ${{ (inputs.fallback_runner && 'ubuntu-latest') || 'scaleset-jupiterone-infra-amd64' }}
container:
# Available containers here: https://hub.docker.com/r/cypress/browsers/tags
image: cypress/browsers:node-18.16.1-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
options: --user 1001
if: ${{ inputs.use_e2e }}
continue-on-error: ${{ inputs.e2e_pass_on_error }}
permissions: write-all
Expand All @@ -189,7 +192,6 @@ jobs:
matrix:
# run copies of the current job in parallel
containers: ${{ fromJson(inputs.e2e_containers) }}
node: [18]
outputs:
test_passed: ${{ steps.e2e_run.outputs.test_passed }}
steps:
Expand Down Expand Up @@ -221,7 +223,7 @@ jobs:
e2e_status:
# Name targeted by branch protections, do not change
name: E2E Status
runs-on: ${{ (inputs.fallback_runner && 'ubuntu-latest') || fromJson('["jupiterone-dev", "arm64"]') }}
runs-on: ${{ (inputs.fallback_runner && 'ubuntu-latest') || 'scaleset-jupiterone-infra-arm64' }}
needs: [e2e_run]
steps:
- uses: actions/checkout@v3
Expand Down

0 comments on commit 74bd950

Please sign in to comment.