diff --git a/.gitea/workflows/npm-audit.yml b/.gitea/workflows/npm-audit.yml new file mode 100644 index 0000000..f42dde4 --- /dev/null +++ b/.gitea/workflows/npm-audit.yml @@ -0,0 +1,27 @@ +name: NPM Audit Check + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + schedule: + - cron: '32 18 * * 5' + +jobs: + + npm_audit: + name: Check NPM audit + runs-on: ubuntu-latest + timeout-minutes: 20 + strategy: + fail-fast: true + permissions: + contents: read + + steps: + - name: Checkout repository + uses: https://github.com/actions/checkout@v4 + + - name: NPM Audit + run: npm audit diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml new file mode 100644 index 0000000..485a4ee --- /dev/null +++ b/.gitea/workflows/test.yml @@ -0,0 +1,44 @@ +name: Unit tests + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + npm_test: + name: Unit tests + runs-on: ubuntu-latest + timeout-minutes: 15 + strategy: + fail-fast: true + matrix: + nodever: + [ + 'latest', + 'lts/*', + 'lts/hydrogen' + ] + permissions: + contents: read + + steps: + - name: Checkout repository + uses: https://github.com/actions/checkout@v4 + + - name: Setup nodejs + uses: https://github.com/actions/setup-node@v4 + with: + node-version: "${{ matrix.nodever }}" + check-latest: true + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Run tests + run: npm test