From da8d9a84e11333d147444113f46c96b712f95894 Mon Sep 17 00:00:00 2001 From: Martin Nefjodov Date: Thu, 11 Apr 2024 15:52:16 +0100 Subject: [PATCH] Allow CI to run on PRs. Also rename the jobs so they are shorter. --- ...{deploy_library.yml => test-and-deplyo.yml} | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) rename .github/workflows/{deploy_library.yml => test-and-deplyo.yml} (86%) diff --git a/.github/workflows/deploy_library.yml b/.github/workflows/test-and-deplyo.yml similarity index 86% rename from .github/workflows/deploy_library.yml rename to .github/workflows/test-and-deplyo.yml index a9fc0b3..1824046 100644 --- a/.github/workflows/deploy_library.yml +++ b/.github/workflows/test-and-deplyo.yml @@ -1,10 +1,8 @@ -name: gocardless/gocardless-nodejs/deploy_library -on: - push: - branches: - - master +name: test & publish +on: push + jobs: - test_library: + test: runs-on: ubuntu-latest container: image: node:lts @@ -12,12 +10,13 @@ jobs: - uses: actions/checkout@v3.3.0 - run: npm install --save-dev jest typescript ts-jest @types/jest - run: npm test - transpile_library: + + transpile: runs-on: ubuntu-latest container: image: node:lts needs: - - test_library + - test steps: - uses: actions/checkout@v3.3.0 - run: npm install @@ -26,13 +25,14 @@ jobs: - uses: actions/upload-artifact@v3.1.1 with: path: "dist" + publish_to_npm: if: github.ref == 'refs/heads/master' runs-on: ubuntu-latest container: image: node:lts needs: - - transpile_library + - transpile env: DIST_FOLDER: "/dist/artifact" steps: