feat(javascript-sdk): add-getdisplayname-to-recoverycodes #885
Workflow file for this run
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
name: ForgeRock Pull Request CI | |
on: | |
pull_request: | |
env: | |
NX_CLOUD_ENCRYPTION_KEY: ${{ secrets.NX_CLOUD_ENCRYPTION_KEY }} | |
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} | |
NX_CLOUD_DISTRIBUTED_EXECUTION: true | |
jobs: | |
pr: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
repository: ${{github.event.pull_request.head.repo.full_name}} | |
fetch-depth: 0 | |
- uses: actions/setup-node@v3 | |
id: cache | |
with: | |
node-version: '18.12.1' | |
cache: 'npm' | |
cache-dependency-path: '**/package-lock.json' | |
- name: Setup custom host for sdkapp.example.com | |
run: | | |
sudo echo "127.0.0.1 localhost sdkapp.example.com auth.example.com api.example.com user.example.com" | sudo tee -a /etc/hosts | |
- name: npm install | |
# if: steps.cache.outputs.cache-hit != 'true' | |
run: npm ci | |
env: | |
DEBUG: pw:install | |
# PLAYWRIGHT_BROWSERS_PATH: 0 | |
PLAYWRIGHT_SKIP_BROWSERS_DOWNLOAD: 1 | |
- run: npx playwright install chromium firefox webkit | |
- name: Derive appropriate SHAs for base and head for `nx affected` commands | |
uses: nrwl/nx-set-shas@v2 | |
with: | |
main-branch-name: 'develop' | |
- run: npm install @nrwl/nx-cloud | |
- run: npx nx-cloud start-ci-run | |
- run: npx nx affected --t build --parallel --max-parallel=3 | |
- run: npx nx affected --t lint --parallel --max-parallel=3 | |
- run: npx nx affected --t test --parallel --max-parallel=3 | |
- run: npx nx affected --t test --configuration=integration | |
# It's important that we always run this step, otherwise in the case of any failures in preceding non-Nx steps, the agents will keep running and waste billable minutes | |
- name: Stop All Agents | |
if: ${{ always() }} | |
run: npx nx-cloud stop-all-agents | |
- name: e2e | |
run: npm run nx e2e autoscript-suites | |
env: | |
NX_CLOUD_DISTRIBUTED_EXECUTION: false | |
- name: 'Artifacts' | |
uses: actions/upload-artifact@v3 | |
with: | |
retention-days: 5 | |
if-no-files-found: ignore | |
path: | | |
${{ github.workspace }}/e2e/autoscript-suites/test-results | |
- name: Slack Notify | |
id: slack | |
uses: slackapi/[email protected] | |
with: | |
payload: | | |
{ | |
"title": "${{ github.event.pull_request.title }}", | |
"author": "${{ github.event.pull_request.user.login }}", | |
"pr_number": "${{ github.event.pull_request.number}}", | |
"url": "${{ github.event.pull_request.html_url }}" | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
agents: | |
runs-on: macos-latest | |
name: Agent Mac | |
strategy: | |
matrix: | |
agent: [1, 2, 3] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
repository: ${{github.event.pull_request.head.repo.full_name}} | |
fetch-depth: 0 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16.13.1' | |
cache: 'npm' | |
cache-dependency-path: '**/package-lock.json' | |
- run: npm ci | |
if: steps.cache.outputs.cache-hit != 'true' | |
env: | |
# PLAYWRIGHT_BROWSERS_PATH: 0 | |
PLAYWRIGHT_SKIP_BROWSERS_DOWNLOAD: 1 | |
- run: npm install @nrwl/nx-cloud | |
- name: Setup custom host for sdkapp.example.com | |
run: sudo echo "127.0.0.1 sdkapp.example.com auth.example.com api.example.com user.example.com" | sudo tee -a /etc/hosts | |
- run: sudo echo "::1 sdkapp.example.com auth.example.com api.example.com user.example.com" | sudo tee -a /etc/hosts | |
- run: npx playwright install chromium firefox webkit | |
- name: Start Nx Agent ${{ matrix.agent }} | |
run: npx nx-cloud start-agent |