Skip to content

Commit

Permalink
Consolidate jobs in GitHub Action
Browse files Browse the repository at this point in the history
Having separate test and deploy jobs is not necessary, and
essentially duplicates the same workflow twice.
  • Loading branch information
kangtastic committed Mar 13, 2024
1 parent 170c9e8 commit 5bba37a
Showing 1 changed file with 4 additions and 27 deletions.
31 changes: 4 additions & 27 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:

jobs:
test:
deploy:
runs-on: ubuntu-latest

steps:
Expand All @@ -17,9 +17,6 @@ jobs:
- name: Setup emsdk
uses: mymindstorm/setup-emsdk@v14

- name: Build WebAssembly modules
run: npm run prebuild

- name: Setup Node
uses: actions/setup-node@v4
with:
Expand All @@ -33,32 +30,12 @@ jobs:
with:
chrome-version: stable

- name: Run Tests
run: npm run test

deploy:
needs: test

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup emsdk
uses: mymindstorm/setup-emsdk@v14

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install npm dependencies
run: npm ci

- name: Build
run: npm run build # Also builds WebAssembly modules.

- name: Run Tests
run: npm run test

- name: Deploy on Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
Expand Down

0 comments on commit 5bba37a

Please sign in to comment.