Skip to content

chore(jest-single): update to Jest 29 #36

chore(jest-single): update to Jest 29

chore(jest-single): update to Jest 29 #36

Workflow file for this run

name: Build
on:
push:
branches:
- main
- staging
pull_request:
jobs:
build:
name: Build and test on node ${{ matrix.node }}
runs-on: ubuntu-latest
strategy:
matrix:
node: ['14', '16']
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- name: Checkout Repo
uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Setup Node
uses: actions/setup-node@v2-beta
with:
node-version: ${{ matrix.node }}
registry-url: 'https://registry.npmjs.org'
- name: Get yarn cache dir
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache Dependencies
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 }}
node_modules
*/*/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build
run: yarn build
- name: Run Lint and Tests
run: yarn test:full
release:
name: Release
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- name: Checkout Repo
uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '16'
registry-url: 'https://registry.npmjs.org'
scope: '@hirez_io'
- name: Get yarn cache dir
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache Dependencies
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 }}
node_modules
*/*/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build
run: yarn build
- name: Run Lint and Tests
run: yarn test:full
- name: Upload coverage reports
uses: codecov/codecov-action@v1
with:
files: ./packages/jasmine-single/coverage/lcov.info, ./packages/jest-single/coverage/lcov.info
- name: Configure CI Git User
run: |
git config --global user.name '@hirezio'
git config --global user.email '[email protected]'
- name: Update Version
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: yarn lerna:version:ci
- name: Check Authentication with Registry
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm whoami
- name: Publish to npm
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn lerna:publish