composite

This commit is contained in:
cupcakearmy 2023-03-03 23:36:55 +01:00
parent 26327ab91e
commit d71416c9da
No known key found for this signature in database
GPG Key ID: 3235314B4D31232F
2 changed files with 24 additions and 11 deletions

22
.github/action/build/action.yaml vendored Normal file
View File

@ -0,0 +1,22 @@
name: "Build"
description: "Build the project."
inputs:
runs:
using: "composite" # This is the magic
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 7
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"
registry-url: https://registry.npmjs.org/
- run: pnpm install --frozen-lockfile
shell: bash
- run: pnpm run build
shell: bash

View File

@ -13,15 +13,6 @@ jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - name: Build
- uses: pnpm/action-setup@v2 uses: ./.github/actions/build
with:
version: 7
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm run compile
- run: pnpm run test - run: pnpm run test