-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Paul Schultz <[email protected]>
- Loading branch information
1 parent
a97df69
commit 44cb624
Showing
4 changed files
with
122 additions
and
150 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,122 @@ | ||
name: Pull Request | ||
|
||
on: pull_request | ||
|
||
env: | ||
TURBO_SCM_BASE: ${{ github.event.pull_request.base.sha }} | ||
TURBO_SCM_HEAD: ${{ github.sha }} | ||
|
||
# enforce only one action can run at a time for a given PR, and | ||
# when updating a PR, actions in progress will be cancelled to start a fresh one | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: Build with Node.js ${{ matrix.node-version }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [20] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
registry-url: 'https://registry.npmjs.org' | ||
cache: 'yarn' | ||
|
||
- name: Setup local Turbo cache | ||
uses: dtinth/setup-github-actions-caching-for-turbo@cc723b4600e40a6b8815b65701d8614b91e2669e # v1 | ||
|
||
- name: Install dependencies | ||
run: | | ||
yarn install | ||
- name: Build packages | ||
uses: ./.github/actions/build | ||
with: | ||
args: --affected | ||
|
||
test: | ||
name: Test with Node.js ${{ matrix.node-version }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [20] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
registry-url: 'https://registry.npmjs.org' | ||
cache: 'yarn' | ||
|
||
- name: Setup local Turbo cache | ||
uses: dtinth/setup-github-actions-caching-for-turbo@cc723b4600e40a6b8815b65701d8614b91e2669e # v1 | ||
|
||
- name: Install dependencies | ||
run: | | ||
yarn install | ||
- name: Verify changesets | ||
if: startsWith(github.ref_name, 'changeset-release/') | ||
run: | | ||
yarn changeset status --since=${{ github.event.pull_request.base.sha }} | ||
- name: Test packages | ||
uses: ./.github/actions/test | ||
with: | ||
args: --affected | ||
|
||
ui-test: | ||
name: UI Tests with Node.js ${{ matrix.node-version }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [20] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
registry-url: 'https://registry.npmjs.org' | ||
cache: 'yarn' | ||
|
||
- name: Setup local Turbo cache | ||
uses: dtinth/setup-github-actions-caching-for-turbo@cc723b4600e40a6b8815b65701d8614b91e2669e # v1 | ||
|
||
- name: Install dependencies | ||
run: | | ||
yarn install | ||
- name: Install playwright | ||
run: npx playwright install --with-deps chromium | ||
|
||
- name: Run tests | ||
run: | | ||
# enable permission support and RBAC plugins | ||
printf "\npermission:\n enabled: true\n" >> $(pwd)/app-config.yaml | ||
yarn run ui-test --affected | ||
- uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4 | ||
if: !cancelled() | ||
with: | ||
name: playwright-report | ||
path: plugins/*/playwright-report/ | ||
retention-days: 1 |