Skip to content

Commit

Permalink
feat: Improve GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jhnns committed Apr 20, 2020
1 parent 4516b88 commit be142b7
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache node modules
uses: actions/cache@v1
env:
cache-name: cache-node-modules
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
- name: npm install
run: |
npm ci --ignore-scripts
Expand All @@ -34,6 +41,6 @@ jobs:
npm install @semantic-release/changelog @semantic-release/git --ignore-scripts --no-save
npx semantic-release
- name: Coveralls
uses: coverallsapp/github-action@v1.0.1
uses: coverallsapp/github-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
17 changes: 16 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,24 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install and test
- name: Cache node modules
uses: actions/cache@v1
env:
cache-name: cache-node-modules
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
- name: npm install
run: |
npm ci --ignore-scripts
env:
CI: true
- name: npm test
run: |
npm test
env:
CI: true
- name: Coveralls
uses: coverallsapp/github-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit be142b7

Please sign in to comment.