Skip to content

CI

CI #762

Workflow file for this run

name: CI
on:
push:
branches:
- component-context-info-origin
pull_request: {}
jobs:
test:
name: Node 14.x - ubuntu
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: volta-cli/action@v1
- name: install dependencies
run: yarn install --frozen-lockfile
- run: yarn compile
- run: yarn lint
- run: yarn test:coverage
- uses: actions/upload-artifact@v2
if: failure()
with:
path: ./debug.*.log
- name: bundle (node)
run: yarn build:bundle:node
- name: bundle (worker)
run: yarn build:bundle:worker
coverage:
name: Coverage
runs-on: ubuntu-latest
timeout-minutes: 10
continue-on-error: true
needs: [test]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: volta-cli/action@v1
- name: install dependencies
run: yarn install --frozen-lockfile
- name: compile codebase
run: yarn compile
- name: check coverage
run: yarn test:coverage
- name: submit coverage
uses: codecov/codecov-action@v1
nodeX:
name: Node ${{ matrix.node-version }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest
timeout-minutes: 10
needs: [test]
strategy:
matrix:
os: [ubuntu]
# os: [ubuntu, windows] @to-to finally fix CI for windows
node-version: [14.x, 16.x, 18.x, 20.x]
# excluded because it is the `test` job above
exclude:
- os: ubuntu
node-version: 14.x
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: volta-cli/action@v1
with:
node-version: ${{ matrix.node-version }}
- name: install dependencies
run: yarn install --frozen-lockfile --ignore-engines
- name: compile
run: yarn compile
- name: test
run: yarn test:coverage
floating-dependencies:
name: Floating Dependencies
runs-on: ubuntu-latest
timeout-minutes: 10
continue-on-error: true
needs: [test]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: volta-cli/action@v1
with:
node-version: 14.x
- name: install dependencies
run: yarn install --no-lockfile --ignore-engines
- name: compile
run: yarn compile
- name: test
run: yarn test:coverage
cd:
runs-on: ubuntu-latest
name: cd
if: github.ref == 'refs/heads/component-context-info-origin'
timeout-minutes: 10
needs: [floating-dependencies]
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
steps:
- name: checkout repo
uses: actions/checkout@v2
with:
persist-credentials: false
- name: fetch all history and tags from all branches for gitversion
run: git fetch --prune --unshallow
- name: setup node
uses: volta-cli/action@v1
with:
node-version: 14.x
- name: install dependencies
run: yarn install --frozen-lockfile
- name: compile
run: yarn compile
- name: bundle for node
run: yarn build:bundle:node
- name: bundle for worker
run: yarn build:bundle:worker
- name: Release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx [email protected]