Skip to content

Feature: Drop it

Feature: Drop it #44

Workflow file for this run

name: "CI"
on:
pull_request:
branches: ["trunk"]
jobs:
install:
runs-on: ubuntu-latest
steps:
- name: Checkout DIVE
uses: actions/checkout@main
- name: Setup Node.js
uses: actions/setup-node@main
- name: Search for cached dependencies
uses: actions/cache@main
id: yarn-cache
with:
path: node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- name: Install DIVE dependencies (if cache not found)
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
lint:
runs-on: ubuntu-latest
needs: install
steps:
- name: Checkout DIVE
uses: actions/checkout@main
- name: Search for cached dependencies
uses: actions/cache@main
id: yarn-cache
with:
path: node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- name: Install DIVE dependencies (if cache not found)
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
- name: Lint DIVE
run: yarn lint
unit:
runs-on: ubuntu-latest
needs: lint
steps:
- name: Checkout DIVE
uses: actions/checkout@main
- name: Search for cached dependencies
uses: actions/cache@main
id: yarn-cache
with:
path: node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- name: Install DIVE dependencies (if cache not found)
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
- name: Unit-Test DIVE (coverage)
run: yarn coverage
build:
runs-on: ubuntu-latest
needs: lint
steps:
- name: Checkout
uses: actions/checkout@main
- name: Search for cached dependencies
uses: actions/cache@main
id: yarn-cache
with:
path: node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- name: Install dependencies (if cache not found)
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
- name: Build DIVE
run: yarn build
publish-dry-run:
runs-on: ubuntu-latest
needs: [unit, build]
steps:
- name: Checkout
uses: actions/checkout@main
- name: Search for cached dependencies
uses: actions/cache@main
id: yarn-cache
with:
path: node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- name: Install dependencies (if cache not found)
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
- name: Publish DIVE to npm (dry-run)
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
access: "public"
dry-run: true