Skip to content

Commit

Permalink
add deploy and tests workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
fariss committed Aug 8, 2024
1 parent e8ea461 commit e8054c2
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy-webui.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Deploy webui to Github Pages
name: deploy Capa Explorer Web to Github Pages

on:
# Runs on pushes targeting the webui branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
paths:
- 'web/explorer/**'

# Allows to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/web-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Capa Explorer Web tests

on:
pull_request:
branches: [ master ]
paths:
- 'web/explorer/**'

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
fetch-depth: 1
show-progress: true

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'
cache-dependency-path: './web/explorer/package-lock.json'

- name: Install dependencies
run: npm ci
working-directory: ./web/explorer

- name: Lint
run: npm run lint
working-directory: ./web/explorer

- name: Format
run: npm run format
working-directory: ./web/explorer

- name: Run unit tests
run: npm run test
working-directory: ./web/explorer

0 comments on commit e8054c2

Please sign in to comment.