From ff638ad04fab71dda0fdf3ca91d27136d5a0ff84 Mon Sep 17 00:00:00 2001 From: Toby Date: Sat, 20 Jan 2024 02:35:06 +0100 Subject: [PATCH] add testing github action --- .github/workflows/publish-main.yml | 6 +++--- .github/workflows/tests.yml | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/publish-main.yml b/.github/workflows/publish-main.yml index ba2bec3..73df1b3 100644 --- a/.github/workflows/publish-main.yml +++ b/.github/workflows/publish-main.yml @@ -1,8 +1,8 @@ -name: Publish (main) +name: Publish on: release: - types: [published] + types: [ published ] jobs: publish: @@ -28,4 +28,4 @@ jobs: - name: Publish to GPR env: NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} - run: npm publish --tag latest --access public + run: npm publish --tag latest --access public \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..ba4a0b5 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,21 @@ +name: Tests + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: latest + registry-url: https://registry.npmjs.org/ + - name: Install dependencies + run: npm ci + - name: Run tests + run: npm test \ No newline at end of file