diff --git a/.github/actions/install-dependencies/action.yml b/.github/actions/install-dependencies/action.yml new file mode 100644 index 000000000..6836b603b --- /dev/null +++ b/.github/actions/install-dependencies/action.yml @@ -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 diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml new file mode 100644 index 000000000..a5328eb13 --- /dev/null +++ b/.github/workflows/build_test.yml @@ -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 + diff --git a/package.json b/package.json index db68834bf..0f2e00183 100644 --- a/package.json +++ b/package.json @@ -86,5 +86,6 @@ "hooks": { "pre-commit": "lint-staged" } - } + }, + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" }