Skip to content

Commit

Permalink
Adopt the reusable workflows from core-commons
Browse files Browse the repository at this point in the history
  • Loading branch information
eaviles committed Oct 21, 2021
1 parent 4e1d23c commit 10828f2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 75 deletions.
47 changes: 7 additions & 40 deletions .github/workflows/publish-module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,11 @@ on:
- main
jobs:
install-and-check:
name: Install & Check
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
check-latest: true
node-version: '14'
- name: Install
run: npm ci --loglevel=error
env:
DISABLE_OPENCOLLECTIVE: true
- name: Run linter
run: npm run eslint
- name: Run tests
run: npm test
env:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
uses: lifion/core-commons/.github/workflows/publish-module.yml@main
secrets:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}

npm-publish:
name: NPM Publish
needs: install-and-check
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
check-latest: true
node-version: '14'
registry-url: 'https://registry.npmjs.org'
- name: Install
run: npm ci --loglevel=error
env:
DISABLE_OPENCOLLECTIVE: true
- name: Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
uses: lifion/core-commons/.github/workflows/publish-module.yml@main
secrets:
NPM_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
33 changes: 4 additions & 29 deletions .github/workflows/pull-request-check.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Pull Request Check
name: Pull-Request Check
on:
push:
branches:
Expand All @@ -8,31 +8,6 @@ on:
- develop
jobs:
check:
name: Node ${{ matrix.node-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [12, 14, 16]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
check-latest: true
- name: Install
run: npm ci --loglevel=error
env:
DISABLE_OPENCOLLECTIVE: true
- name: Run linter
run: npm run eslint
- name: Run tests
run: npm test -- --ci --runInBand
env:
CI: true
- name: Report coverage
run: npx codecov
env:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
uses: lifion/core-commons/.github/workflows/pull-request-check.yml@main
secrets:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
6 changes: 0 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,5 @@
},
"devDependencies": {
"core-commons": "^1.0.0-alpha.1"
},
"@lifion/core-commons": {
"autoDocs": false,
"template": "public",
"updated": "2019-11-11T21:11:42.541Z",
"version": "2.3.4"
}
}

0 comments on commit 10828f2

Please sign in to comment.