From 2215c6c88ba586538f30f70aec9439c8d7194d16 Mon Sep 17 00:00:00 2001 From: Robert Herber Date: Thu, 13 Jun 2024 16:12:29 +0200 Subject: [PATCH] fix: workflows --- .github/workflows/master.yml | 8 ++--- .github/workflows/pr.yml | 9 ++--- .github/workflows/test.yml | 64 +++++++++++++++++++++++++++++++++--- 3 files changed, 69 insertions(+), 12 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index af5b9f2..f3bc3ed 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -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: @@ -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 }} @@ -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: | @@ -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 }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 67e841f..335d6a8 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -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 @@ -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 }} @@ -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: | @@ -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 }} @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b4ed777..96ef4d3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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: @@ -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