Skip to content

feat: Separate Opt Out from the consentless test #206

feat: Separate Opt Out from the consentless test

feat: Separate Opt Out from the consentless test #206

Workflow file for this run

name: CI Core
on:
push:
branches:
- "main"
pull_request:
branches-ignore:
- "gh-pages"
defaults:
run:
working-directory: ./core
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
cache: "yarn"
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run unit tests
run: yarn test --coverage --ci
- name: Report coverage
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
base-path: ./core
path-to-lcov: ./core/coverage/lcov.info
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
cache: "yarn"
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Lint files
run: yarn lint
- name: Check formatting
run: yarn prettier:check
types:
name: Type check
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
cache: "yarn"
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Check types
run: yarn tsc
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
cache: "yarn"
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build package
run: yarn build
- name: Save build
if: github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v3
with:
name: core
path: core/dist
release:
name: Release
needs: [build, test, lint, types]
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
- name: Setup node
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
cache: "yarn"
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Fetch build
uses: actions/download-artifact@v3
with:
name: core
path: core/dist
- name: Release
run: yarn semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
HUSKY: 0