Skip to content

build(deps): update devdependency eslint-config-prettier to ~8.9.0 (#… #809

build(deps): update devdependency eslint-config-prettier to ~8.9.0 (#…

build(deps): update devdependency eslint-config-prettier to ~8.9.0 (#… #809

Workflow file for this run

name: CI
on:
push:
branches: [develop]
workflow_dispatch:
branches: [develop]
env:
FORCE_COLOR: true
NODE_VERSION: 18
jobs:
setup:
name: Lint Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
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: Install Dependencies
run: yarn install --immutable
- name: Run Linter
run: yarn lint
test:
name: Test Package
runs-on: ${{ matrix.OS }}
needs: [setup]
strategy:
matrix:
OS: [ubuntu-latest, macos-latest]
NODE_VERSION: [14, 16, 18, latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.NODE_VERSION }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
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: Install Dependencies
run: yarn install --immutable
- name: Run Tests with Coverage
if: matrix.NODE_VERSION == 'latest' && matrix.OS == 'ubuntu-latest'
run: yarn coverage
- name: Run Tests without Coverage
if: matrix.NODE_VERSION != 'latest' && matrix.OS != 'ubuntu-latest'
run: yarn test
release:
name: Release Package
runs-on: ubuntu-latest
needs: [setup, test]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
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: Install Dependencies
run: yarn install --immutable
- name: Build Package
run: yarn build
- name: Create Release
if: success() && github.ref == 'refs/heads/develop'
run: yarn semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}