Skip to content

Instantly share code, notes, and snippets.

@k8adev
Created July 3, 2020 16:00
Show Gist options
  • Save k8adev/da7d86ae50d8d4f8eae7a642b2de3048 to your computer and use it in GitHub Desktop.
Save k8adev/da7d86ae50d8d4f8eae7a642b2de3048 to your computer and use it in GitHub Desktop.
Example of workflow for monorepo with GitHub Action 📦
name: promote-dev-cool-package
on:
push:
paths:
- packages/cool-package/**
branches-ignore:
- master
- refs/tags/*
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- name: Install dependencies
run: yarn install --frozen-lockfile
- uses: actions/cache@v1
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-build-node-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-node-modules
${{ runner.os }}-build-
${{ runner.os }}-
- name: Run lint test
run: echo "run lint test script"
unit-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- name: Install dependencies
run: yarn install --frozen-lockfile
- uses: actions/cache@v1
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-build-node-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-node-modules
${{ runner.os }}-build-
${{ runner.os }}-
- name: Run unit test
run: echo "run unit test script"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment