Skip to content

fix: provide support for packages when dependencies do not exist (package-lock v3) #71

fix: provide support for packages when dependencies do not exist (package-lock v3)

fix: provide support for packages when dependencies do not exist (package-lock v3) #71

Workflow file for this run

# This is a Github Workflow that runs tests on any push or pull request.
# If the tests pass and this is a push to the master branch it also runs Semantic Release.
name: CI
on: [push, pull_request]
jobs:
# Handle [skip ci] / [ci skip] directives in commit messages
init:
if: github.event_name == 'push'
name: init
runs-on: ubuntu-20.04
outputs:
skip: ${{ steps.ci-skip-step.outputs.ci-skip }}
skip-not: ${{ steps.ci-skip-step.outputs.ci-skip-not }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- id: ci-skip-step
uses: mstachniuk/ci-skip@v1
# Fast unit tests flow
test_push:
if: github.event_name == 'push'
needs: init
runs-on: ubuntu-20.04
steps:
- name: Checkuout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup NodeJS
uses: actions/setup-node@v2
with:
node-version: 16
- name: Yarn install
run: yarn
- name: Unit test only
run: yarn cover:unit
- name: Coveralls
if: github.ref == 'refs/heads/master'
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# Full tests for PR
test_pr:
if: github.event_name == 'pull_request'
strategy:
matrix:
os: [ windows-2019, ubuntu-20.04 ]
node-version: [ 12, 14, 16 ]
name: Test (Node v${{ matrix.node-version }}, OS ${{ matrix.os }})
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup NodeJS v${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Yarn install
run: yarn
- name: Intergarion test
if: matrix.node-version != '16' || matrix.os != 'ubuntu-20.04'
run: cli/synp.js -s yarn.lock
- name: Full test suite
if: matrix.node-version == '16' && matrix.os == 'ubuntu-20.04'
run: yarn test
# Release
release:
name: Release
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
runs-on: ubuntu-20.04
needs: test_push
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup NodeJS
uses: actions/setup-node@v2
with:
node-version: 16
- name: Yarn install
run: yarn
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v2
with:
extra_plugins: |
@semantic-release/changelog@6
@semantic-release/git@10
@semantic-release/github@8
@semantic-release/npm@8
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GIT_AUTHOR_EMAIL: '[email protected]'
GIT_COMMITTER_EMAIL: '[email protected]'
GIT_AUTHOR_NAME: '@antongolub'
GIT_COMMITTER_NAME: '@antongolub'