diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml new file mode 100644 index 0000000..4afaafd --- /dev/null +++ b/.forgejo/workflows/test.yml @@ -0,0 +1,41 @@ +name: Build and Test + +on: + push: + branches: + - main + +jobs: + + build-and-test: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Cache dependencies + uses: actions/cache@v4 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + + - run: npm ci + + - name: Check types and style + run: npm run check + + - name: Test + run: npm test + + - name: Ensure build wokrs + run: npm run dev \ No newline at end of file