This repository has been archived by the owner on Jun 28, 2024. It is now read-only.
feat: handle provider already exists error #1669
Workflow file for this run
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: CI | |
on: | |
- push | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
# Setup environment and checkout the project master | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v2 | |
with: | |
registry-url: https://registry.npmjs.org/ | |
scope: "@superfaceai" | |
node-version: "14" | |
- name: Checkout | |
uses: actions/[email protected] | |
# Setup yarn cache | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/[email protected] | |
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- | |
# Install and run tests | |
- name: Install dependencies | |
run: yarn install | |
- name: Build | |
run: yarn build | |
- name: Test | |
run: yarn test --bail | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
# Setup environment and checkout the project master | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v2 | |
with: | |
registry-url: https://registry.npmjs.org/ | |
scope: "@superfaceai" | |
node-version: "14" | |
- name: Checkout | |
uses: actions/[email protected] | |
# Setup yarn cache | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/[email protected] | |
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- | |
# Install and run lint | |
- name: Install dependencies | |
run: yarn install | |
- name: Lint | |
run: yarn lint | |
license-check: | |
runs-on: ubuntu-latest | |
steps: | |
# Setup environment and checkout the project master | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v2 | |
with: | |
registry-url: https://registry.npmjs.org/ | |
scope: "@superfaceai" | |
node-version: "14" | |
- name: Checkout | |
uses: actions/[email protected] | |
# Setup yarn cache | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/[email protected] | |
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- | |
# Install and run license checker | |
- name: Install dependencies | |
run: yarn install | |
- name: Install License checker | |
run: | | |
yarn global add license-checker | |
echo "$(yarn global bin)" >> $GITHUB_PATH | |
- name: Check licenses | |
run: "license-checker --onlyAllow '0BDS;MIT;Apache-2.0;ISC;BSD-3-Clause;BSD-2-Clause;CC-BY-4.0;CC-BY-3.0;BSD;CC0-1.0;Unlicense' --summary" |