Skip to content

Instantly share code, notes, and snippets.

@janhesters
Created November 9, 2020 18:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save janhesters/fafa2f58650edec029fe405529d80e8c to your computer and use it in GitHub Desktop.
Save janhesters/fafa2f58650edec029fe405529d80e8c to your computer and use it in GitHub Desktop.
Our workflow.
name: Pull Request
on: [pull_request]
jobs:
unit-and-integration:
strategy:
fail-fast: false
matrix:
command:
- cover:unit
- cover:integration
name: ${{ matrix.command }}
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v2
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: 'Setup registry'
run: |
echo "//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN" >> ~/.npmrc 2> /dev/null
echo "@hopin-team:registry=https://npm.pkg.github.com/" >> ~/.npmrc 2> /dev/null
env:
GITHUB_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN }}
- name: 'Install dependencies'
run: yarn install --frozen-lockfile
- name: 'Run ${{ matrix.command }}'
run: yarn ${{ matrix.command }}
env:
HOPIN_WEBRTC_API_TOKEN: ${{ secrets.HOPIN_WEBRTC_API_TOKEN }}
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.command }}
parallel: true
coverage-report:
needs: unit-and-integration
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment