Skip to content

Commit

Permalink
Merge pull request #23 from Boulevard/ci-fixes
Browse files Browse the repository at this point in the history
CI parity between CI and CD fixes
  • Loading branch information
jstewart authored Nov 14, 2023
2 parents 676db8e + 15fc184 commit 27aac9f
Show file tree
Hide file tree
Showing 5 changed files with 1,366 additions and 1,654 deletions.
22 changes: 22 additions & 0 deletions .github/actions/install-dependencies/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Install Dependencies
description: Installs all project dependencies.
inputs:
github-token:
description: Needed for authenticating with GitHub's package repository.
required: true
type: string
runs:
using: "composite"
steps:
- name: Install system dependencies
uses: asdf-vm/actions/install@v2
- name: Hydrate node modules cache
uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install node modules
shell: bash
run: |
echo "//npm.pkg.github.com/:_authToken=${{ inputs.github-token }}" >> .npmrc
yarn install --frozen-lockfile
9 changes: 2 additions & 7 deletions .github/workflows/pr.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,8 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Yarn install
uses: borales/actions-yarn@v4
with:
cmd: install # will run `yarn install` command
- name: Install dependencies
uses: ./.github/actions/install-dependencies
- run: npm test
env:
SANDBOX_API_KEY: ${{ secrets.SANDBOX_API_KEY }}
7 changes: 2 additions & 5 deletions .github/workflows/release.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '14.x'
registry-url: 'https://registry.npmjs.org'
- run: npm install
- name: Install dependencies
uses: ./.github/actions/install-dependencies
- run: npm test
env:
SANDBOX_API_KEY: ${{ secrets.SANDBOX_API_KEY }}
Expand Down
2 changes: 2 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
nodejs 16.14.0
yarn 1.22.5
Loading

0 comments on commit 27aac9f

Please sign in to comment.