From 6e01d62c2767253718be532bbcae97293832d43e Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Thu, 28 Sep 2023 19:41:27 -0300 Subject: [PATCH] Run tests on CI --- .github/workflows/tests.yml | 23 +++++++++++++++++++++++ package.json | 3 ++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..ca088ee --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,23 @@ +name: photon + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node: [ 18 ] + name: tests + steps: + - uses: actions/checkout@v3 + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node }} + - run: npm i + - run: npm test diff --git a/package.json b/package.json index e730e5f..b80a546 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "webpack-cli": "^4.10.0" }, "scripts": { - "build": "npm exec webpack" + "build": "npm exec webpack", + "test": "npm exec jest -- test" } }