Skip to content

Commit

Permalink
feat: update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
stanleyyconsensys committed Jun 14, 2024
1 parent a0e4283 commit e4b9dcf
Show file tree
Hide file tree
Showing 12 changed files with 379 additions and 334 deletions.
76 changes: 76 additions & 0 deletions .github/workflows/build-lint-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Build, Lint, and Test

on:
workflow_call:

jobs:
prepare:
name: Prepare
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install Yarn dependencies
run: yarn --no-immutable

build:
name: Build
runs-on: ubuntu-latest
needs:
- prepare
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Cache NPM tarballs
id: cache-npm-tarballs
uses: actions/cache@v3
with:
path: |
node_modules/.cache/npm
key: npm-tarballs-${{ github.run_id }}
restore-keys: |
npm-tarballs
- run: yarn --no-immutable
- run: yarn build

lint:
name: Lint
runs-on: ubuntu-latest
needs:
- prepare
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- run: yarn --no-immutable
- run: yarn lint

test:
name: Test
runs-on: ubuntu-latest
needs:
- prepare
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn --no-immutable
- run: yarn build
- run: yarn test
54 changes: 0 additions & 54 deletions .github/workflows/build-test.yml

This file was deleted.

72 changes: 0 additions & 72 deletions .github/workflows/deploy-dev.yml

This file was deleted.

Loading

0 comments on commit e4b9dcf

Please sign in to comment.