From 64b454e2ce3469fd6a222b38c73f7165cae0642f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Spie=C3=9F?= Date: Wed, 31 Jan 2024 15:34:39 +0100 Subject: [PATCH 1/2] Add GitHub Actions workflow to run tests --- .github/workflows/test.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 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 00000000..43cf99f4 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,29 @@ +name: Run tests + +on: + push: + branches: + - master + pull_request: + branches: + - master + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.1 + + - uses: actions/setup-node@v4.0.1 + with: + node-version: 18 + cache: 'npm' + + - name: Install dependencies + run: npm install + + - name: Run tests + run: npm test From 25195d93030ef73156f663742ad83997c59fa8ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Spie=C3=9F?= Date: Wed, 31 Jan 2024 23:06:20 +0100 Subject: [PATCH 2/2] Use `npm ci` to install dependencies in CI --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 43cf99f4..781defbf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,7 @@ jobs: cache: 'npm' - name: Install dependencies - run: npm install + run: npm ci - name: Run tests run: npm test