Skip to content

Commit

Permalink
Added testing on all branches to CI
Browse files Browse the repository at this point in the history
Added testing before deployment on master
Fixed dependency resolution conflicts in package.json
  • Loading branch information
Shenato committed Jun 11, 2023
1 parent 952556e commit 2211c95
Show file tree
Hide file tree
Showing 4 changed files with 2,751 additions and 2,490 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
# Sequence of patterns matched against refs/heads
branches:
- master
- v2

jobs:
pre-publish:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -45,6 +45,9 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGE_TOKEN }}
- run: npm run build

- name: run unit tests
run: npm test

- name: publish-npm
run: npm publish --access public
env:
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish npm package
on:
push:
branches:
- '*' # matches every branch that doesn't contain a '/'
- '*/*' # matches every branch containing a single '/'
- '**' # matches every branch
- '!master' # excludes master

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
# Setup .npmrc file to publish to GitHub Packages
- uses: actions/setup-node@v2
with:
node-version: '12.x'
registry-url: 'https://registry.npmjs.org'
scope: '@g-loot'

- run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGE_TOKEN }}
- run: npm run build

- name: run unit tests
run: npm test
Loading

1 comment on commit 2211c95

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.