Skip to content

Commit

Permalink
fix: workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
robertherber committed Jun 13, 2024
1 parent 74e7293 commit 2215c6c
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 12 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: cardinalby/export-env-action@v2
with:
Expand All @@ -38,7 +38,7 @@ jobs:
working-directory: example-expo

- name: Expo GitHub Action
uses: expo/expo-github-action@v7
uses: expo/expo-github-action@v8
with:
# Your Expo username, for authentication.
token: ${{ secrets.EXPO_TOKEN }}
Expand All @@ -49,7 +49,7 @@ jobs:

- name: Find Metro cache
id: metro-cache-dir-path
uses: actions/github-script@v4
uses: actions/github-script@v7
with:
result-encoding: string
script: |
Expand All @@ -58,7 +58,7 @@ jobs:
return path.join(os.tmpdir(), 'metro-cache');
- name: Restore Metro cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{ steps.metro-cache-dir-path.outputs.result }}
key: ${{ runner.os }}-metro-cache-${{ matrix.app }}-${{ github.ref }}
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.number }}/merge

Expand All @@ -42,7 +42,7 @@ jobs:
working-directory: example-expo

- name: Expo GitHub Action
uses: expo/expo-github-action@v7
uses: expo/expo-github-action@v8
with:
# Your Expo username, for authentication.
token: ${{ secrets.EXPO_TOKEN }}
Expand All @@ -53,7 +53,7 @@ jobs:

- name: Find Metro cache
id: metro-cache-dir-path
uses: actions/github-script@v4
uses: actions/github-script@v7
with:
result-encoding: string
script: |
Expand All @@ -62,7 +62,7 @@ jobs:
return path.join(os.tmpdir(), 'metro-cache');
- name: Restore Metro cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{ steps.metro-cache-dir-path.outputs.result }}
key: ${{ runner.os }}-metro-cache-${{ matrix.app }}-${{ github.ref }}
Expand Down Expand Up @@ -97,5 +97,6 @@ jobs:
expo_organisation_or_user_slug: react-native-healthkit
working_directory: ./example-expo
always_run: true
package_manager: bun
no_wait: false
checkout_ref: refs/pull/${{ github.event.number }}/merge
64 changes: 60 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,38 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: cardinalby/export-env-action@v2
with:
envFile: .env.github

- uses: oven-sh/setup-bun@v1
with:
bun-version: ${{ env.BUN_VERSION }}

- name: Install example deps
run: cd example && bun install && cd ..

- name: Install example-expo deps
run: cd example-expo && bun install && cd ..

- name: Install deps
run: bun install

- name: Test
run: bun test-only

lint:
# The type of runner that the job will run on
runs-on: ubuntu-latest
timeout-minutes: 10

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@v4

- uses: cardinalby/export-env-action@v2
with:
Expand All @@ -44,8 +75,33 @@ jobs:
- name: Lint
run: bun lint

typecheck:
# The type of runner that the job will run on
runs-on: ubuntu-latest
timeout-minutes: 10

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@v4

- uses: cardinalby/export-env-action@v2
with:
envFile: .env.github

- uses: oven-sh/setup-bun@v1
with:
bun-version: ${{ env.BUN_VERSION }}

- name: Install example deps
run: cd example && bun install && cd ..

- name: Install example-expo deps
run: cd example-expo && bun install && cd ..

- name: Install deps
run: bun install

- name: Types
run: bun typecheck

- name: Test
run: bun test-only

0 comments on commit 2215c6c

Please sign in to comment.