Created
November 9, 2020 18:53
-
-
Save janhesters/fafa2f58650edec029fe405529d80e8c to your computer and use it in GitHub Desktop.
Our workflow.
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: 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