Skip to content

Commit

Permalink
test(ci): forward port from GITHUB_OUTPUT vs set-output
Browse files Browse the repository at this point in the history
should get rid of all the warnings associated with the set-output
functionality going away in Github CI
  • Loading branch information
mikehardy committed Apr 9, 2024
1 parent 634ffb6 commit d07e6ef
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 23 deletions.
27 changes: 15 additions & 12 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Set workflow variables
id: workflow-variables
run: |
echo "yarn-cache=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
name: Yarn Cache
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
path: ${{ steps.workflow-variables.outputs.yarn-cache }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-yarn-
Expand All @@ -57,14 +58,15 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Set workflow variables
id: workflow-variables
run: |
echo "yarn-cache=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
name: Yarn Cache
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
path: ${{ steps.workflow-variables.outputs.yarn-cache }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-yarn-
Expand All @@ -90,14 +92,15 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Set workflow variables
id: workflow-variables
run: |
echo "yarn-cache=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
name: Yarn Cache
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
path: ${{ steps.workflow-variables.outputs.yarn-cache }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }}-with-website
restore-keys: |
${{ runner.os }}-yarn-
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/tests_e2e_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,17 @@ jobs:
with:
node-version: 18

# Set path variables needed for caches
- name: Set workflow variables
id: workflow-variables
run: |
echo "::set-output name=metro-cache::$HOME/.metro"
echo "::set-output name=yarn-cache-dir::$(yarn cache dir)"
echo "yarn-cache=$(yarn cache dir)" >> $GITHUB_OUTPUT
echo "metro-cache=$HOME/.metro" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
name: Yarn Cache
id: yarn-cache
with:
path: ${{ steps.workflow-variables.outputs.yarn-cache-dir }}
path: ${{ steps.workflow-variables.outputs.yarn-cache }}
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/package.json') }}
restore-keys: ${{ runner.os }}-yarn-v1

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests_e2e_ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ jobs:
- name: Set workflow variables
id: workflow-variables
run: |
echo "::set-output name=metro-cache::$HOME/.metro"
echo "::set-output name=yarn-cache-dir::$(yarn cache dir)"
echo "yarn-cache=$(yarn cache dir)" >> $GITHUB_OUTPUT
echo "metro-cache=$HOME/.metro" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
name: Yarn Cache
id: yarn-cache
with:
path: ${{ steps.workflow-variables.outputs.yarn-cache-dir }}
path: ${{ steps.workflow-variables.outputs.yarn-cache }}
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/package.json') }}
restore-keys: ${{ runner.os }}-yarn-v1

Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/tests_jest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,15 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Set workflow variables
id: workflow-variables
run: |
echo "yarn-cache=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
name: Yarn Cache
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
path: ${{ steps.workflow-variables.outputs.yarn-cache }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-yarn-
Expand Down

0 comments on commit d07e6ef

Please sign in to comment.