Skip to content

Commit

Permalink
ci: github workflow for explorer-client
Browse files Browse the repository at this point in the history
* 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
pchrysochoidis committed Mar 7, 2022
1 parent 8e5766c commit 62d9829
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/explorer-client-prs.yml
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

0 comments on commit 62d9829

Please sign in to comment.