diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml new file mode 100644 index 0000000..a476efa --- /dev/null +++ b/.github/workflows/run-tests.yaml @@ -0,0 +1,34 @@ +on: + push: + paths-ignore: + - README.md + branches: + - master + pull_request: + paths-ignore: + - README.md + +name: Run tests + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Node + uses: actions/setup-node@v2 + with: + node-version: 20 + + - name: Restore the node modules + uses: actions/cache@v3 + with: + path: '**/node_modules' + key: modules-${{ hashFiles('**/package.json') }} + + - name: Install packages + run: npm i --include-dev + + - name: Run tests + run: npm run test