Created
July 3, 2020 16:00
-
-
Save k8adev/da7d86ae50d8d4f8eae7a642b2de3048 to your computer and use it in GitHub Desktop.
Example of workflow for monorepo with GitHub Action 📦
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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