Skip to content

Commit

Permalink
Allow CI to run on PRs.
Browse files Browse the repository at this point in the history
Also rename the jobs so they are shorter.
  • Loading branch information
martin-nef committed Apr 11, 2024
1 parent b728f68 commit da8d9a8
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
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
steps:
- uses: actions/[email protected]
- 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/[email protected]
- run: npm install
Expand All @@ -26,13 +25,14 @@ jobs:
- uses: actions/[email protected]
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:
Expand Down

0 comments on commit da8d9a8

Please sign in to comment.