Skip to content

Commit

Permalink
build: setup build and test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
P0lip committed Nov 26, 2024
1 parent 54360fa commit 283dc83
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .github/actions/install-dependencies/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: install-dependencies
description: Install dependencies for the project
runs:
using: "composite"
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"

- name: Install Dependencies
shell: bash
run: yarn --frozen-lockfile
56 changes: 56 additions & 0 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build and Test

on:
push:
branches:
- "**"

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout local
uses: actions/checkout@v3

- name: Install Dependencies
uses: ./.github/actions/install-dependencies

- name: Lint
shell: bash
run: yarn lint

test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout local
uses: actions/checkout@v3

- name: Install Dependencies
uses: ./.github/actions/install-dependencies

- name: Test
shell: bash
run: yarn test

test-harness:
name: Test Harness
runs-on: ubuntu-latest
steps:
- name: Checkout local
uses: actions/checkout@v3

- name: Install Dependencies
uses: ./.github/actions/install-dependencies

- name: Build
shell: bash
run: |
yarn build
yarn build.binary -- --target=node18
- name: Test
shell: bash
run: yarn test.harness

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,6 @@
"hooks": {
"pre-commit": "lint-staged"
}
}
},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}

0 comments on commit 283dc83

Please sign in to comment.