Skip to content

Commit

Permalink
ci(workflows): nodejs
Browse files Browse the repository at this point in the history
  • Loading branch information
sambacha authored and sam bacha committed Apr 8, 2022
1 parent af2e582 commit ca5bb38
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: nodejs

on:
push:
paths:
- "**/**"
- "!**/*.md/**"
env:
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
PULL_NUMBER: ${{ github.event.pull_request.number }}
RUN_ID: ${{ github.run_id }}
FORCE_COLOR: 2

jobs:
pipeline:
name: Node ${{ matrix.node-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
node-version: ['16.x']
os: ['ubuntu-latest']

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install project dependencies
run: yarn --prefer-offline
id: install

- name: Install project dependencies
run: yarn run build
id: build

0 comments on commit ca5bb38

Please sign in to comment.