Bump word-wrap from 1.2.3 to 1.2.4 #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
pull_request: | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
if: ${{ !startsWith(github.ref, 'refs/tags/') }} # release runs tests on its own | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Node.js environment | |
uses: actions/[email protected] | |
- name: Cache pnpm modules | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-pnpm-modules | |
with: | |
path: ~/.pnpm-store | |
key: pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
pnpm- | |
- name: Setup pnpm | |
uses: pnpm/[email protected] | |
with: | |
version: 6.0.2 | |
run_install: true | |
- name: Run all tests | |
uses: mattallty/jest-github-action@v1 | |
with: | |
coverage-comment: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
coverage: | |
name: Coverage | |
runs-on: ubuntu-latest | |
needs: test # only update coverage if tests pass | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Node.js environment | |
uses: actions/[email protected] | |
- name: Cache pnpm modules | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-pnpm-modules | |
with: | |
path: ~/.pnpm-store | |
key: pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
pnpm- | |
- name: Setup pnpm | |
uses: pnpm/[email protected] | |
with: | |
version: 6.0.2 | |
run_install: true | |
- name: Generate coverage | |
run: npm run coverage | |
- name: Upload coverage | |
uses: codecov/codecov-action@v1 | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Node.js environment | |
uses: actions/[email protected] | |
- name: Cache pnpm modules | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-pnpm-modules | |
with: | |
path: ~/.pnpm-store | |
key: pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
pnpm- | |
- name: Setup pnpm | |
uses: pnpm/[email protected] | |
with: | |
version: 6.0.2 | |
run_install: true | |
- name: Build | |
run: npm run build # runs tests and build | |
- name: Deploy | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: build |