From 565f8f64d3e8174311811b159203b37812ca9588 Mon Sep 17 00:00:00 2001 From: Elyse Date: Sat, 12 Mar 2022 16:26:16 -0600 Subject: [PATCH 1/2] Run publish action only on original repository This will avoid executing the action in forks --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 304b41f..f7c6237 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,6 +7,7 @@ on: jobs: deploy: + if: github.repository == 'LuisEnMarroquin/json-as-xlsx' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 From 1d2870d29f421998bf9868b80c436428b5260d1b Mon Sep 17 00:00:00 2001 From: Elyse Date: Sat, 12 Mar 2022 16:27:13 -0600 Subject: [PATCH 2/2] Add test suite action This action will execute the test suite on every push to any branch or pull request. --- .github/workflows/test-suite.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/test-suite.yml diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml new file mode 100644 index 0000000..55dccbd --- /dev/null +++ b/.github/workflows/test-suite.yml @@ -0,0 +1,13 @@ +name: Run test suite + +on: [push, pull_request_target] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install dependencies + run: npm ci + - name: Run unit tests + run: npm run test