forked from MystenLabs/sui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: github workflow for explorer-client
* run lint test and build for explorer client on pull request (open, sync, reopen) * this check will be required to pass for the PR in order to allow merging * runs the actual workload only when changes are detected under the explorer/client directory
- Loading branch information
1 parent
8e5766c
commit 62d9829
Showing
1 changed file
with
42 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Explorer Client PR checks | ||
on: pull_request | ||
jobs: | ||
diff: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
isClient: ${{ steps.diff.outputs.isClient }} | ||
steps: | ||
- name: Detect Changes | ||
uses: dorny/[email protected] | ||
id: diff | ||
with: | ||
filters: | | ||
isClient: | ||
- 'explorer/client/**' | ||
- '.github/workflows/explorer-client-prs.yml' | ||
client_checks: | ||
name: Lint, Test & Build | ||
needs: diff | ||
if: needs.diff.outputs.isClient == 'true' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Install Nodejs | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16' | ||
cache: 'npm' | ||
cache-dependency-path: ./explorer/client/package-lock.json | ||
- name: Install npm dependencies | ||
working-directory: ./explorer/client | ||
run: npm ci | ||
- name: Lint | ||
working-directory: ./explorer/client | ||
run: npm run lint | ||
- name: Test | ||
working-directory: ./explorer/client | ||
run: npm run test | ||
- name: Build | ||
working-directory: ./explorer/client | ||
run: npm run build |