Skip to content

Commit

Permalink
ci(parametrization): fixing prior bad merge conflict resolution [CNDL…
Browse files Browse the repository at this point in the history
…-489]
  • Loading branch information
nikwotton committed Jun 3, 2024
1 parent 0e6b303 commit 3035e59
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 8 deletions.
13 changes: 9 additions & 4 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
name: Setup
description: Setup Node.js and install dependencies

inputs:
workingDirectory:
required: true
type: string

runs:
using: composite
steps:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: packages/npm/send/.nvmrc
node-version-file: ${{ inputs.workingDirectory }}/.nvmrc

- name: Set up Git
shell: bash
Expand All @@ -20,8 +25,8 @@ runs:
uses: actions/cache@v3
with:
path: |
packages/npm/send/**/node_modules
packages/npm/send/.yarn/install-state.gz
${{ inputs.workingDirectory }}/**/node_modules
${{ inputs.workingDirectory }}/.yarn/install-state.gz
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
Expand All @@ -30,5 +35,5 @@ runs:
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --immutable
working-directory: packages/npm/send
working-directory: ${{ inputs.workingDirectory }}
shell: bash
13 changes: 9 additions & 4 deletions .github/workflows/release_shared.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: Release

on:
push:
branches:
- main
workflow_call:
inputs:
workingDirectory:
required: true
type: string

jobs:
release:
Expand All @@ -11,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: "packages/npm/send"
working-directory: ${{ inputs.workingDirectory }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -21,6 +24,8 @@ jobs:

- name: Setup
uses: ./.github/actions/setup
with:
workingDirectory: ${{ inputs.workingDirectory }}

- name: Initialize the Npm Config
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Test

on:
pull_request:
branches:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/tests_shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:

- name: Setup
uses: ./.github/actions/setup
with:
workingDirectory: ${{ inputs.workingDirectory }}

- name: Lint files
run: yarn lint
Expand All @@ -37,6 +39,8 @@ jobs:

- name: Setup
uses: ./.github/actions/setup
with:
workingDirectory: ${{ inputs.workingDirectory }}

- name: Run unit tests
run: yarn test --maxWorkers=2 --coverage
Expand All @@ -52,6 +56,8 @@ jobs:

- name: Setup
uses: ./.github/actions/setup
with:
workingDirectory: ${{ inputs.workingDirectory }}

- name: Build package
run: yarn prepare
Expand All @@ -69,6 +75,8 @@ jobs:

- name: Setup
uses: ./.github/actions/setup
with:
workingDirectory: ${{ inputs.workingDirectory }}

- name: Cache turborepo for Android
uses: actions/cache@v3
Expand Down Expand Up @@ -128,6 +136,8 @@ jobs:

- name: Setup
uses: ./.github/actions/setup
with:
workingDirectory: ${{ inputs.workingDirectory }}

- name: Cache turborepo for iOS
uses: actions/cache@v3
Expand Down

0 comments on commit 3035e59

Please sign in to comment.