From 8e970f9510da440f1e23e60a448be9174a4b8c51 Mon Sep 17 00:00:00 2001 From: Ty Date: Tue, 23 Jul 2024 20:42:17 +0200 Subject: [PATCH] Add github actions workflow --- .github/workflows/test.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..48b4606 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,34 @@ +on: + push: + branches: [ "*" ] + pull_request: + +jobs: + test: + strategy: + matrix: + node-version: ['latest', 'lts/iron'] + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Install Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + - name: Enable corepack + run: corepack enable + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT + - uses: actions/cache@v3 + id: yarn-cache + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: Install packages + run: yarn install --immutable + - name: Build with astro + run: yarn build \ No newline at end of file