Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-zimerman committed Nov 15, 2024
1 parent 19106d7 commit 88fed1a
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,19 @@ jobs:
uses: actions/setup-node@v4
# we use a hash of yarn.lock as our cache key, because if it hasn't changed, our dependencies haven't changed,
# so no need to reinstall them
with:
node-version: 18 # Specify the Node.js version explicitly
- name: Compute dependency cache key
id: compute_lockfile_hash
run: echo "hash=${{ hashFiles('yarn.lock') }}" >> "$GITHUB_OUTPUT"
run: echo "hash=${{ hashFiles('**/yarn.lock') }}" >> "$GITHUB_OUTPUT"
- name: Check dependency cache
uses: actions/cache@v4
id: cache_dependencies
with:
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
key: ${{ steps.compute_lockfile_hash.outputs.hash }}
- name: Install dependencies
if: steps.cache_dependencies.outputs.cache-hit != 'true'
if: steps.cache_dependencies.outputs.cache-hit == 'false'
run: yarn install
outputs:
dependency_cache_key: ${{ steps.compute_lockfile_hash.outputs.hash }}
Expand All @@ -56,6 +58,8 @@ jobs:
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Check dependency cache
uses: actions/cache@v4
with:
Expand All @@ -79,6 +83,8 @@ jobs:
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Check dependency cache
uses: actions/cache@v4
with:
Expand All @@ -95,11 +101,10 @@ jobs:
# packages, and so `yarn build` should always run. This `if` check is therefore only there for testing CI issues
# where the built packages are beside the point. In that case, you can change `BUILD_CACHE_KEY` (at the top of
# this file) to a constant and skip rebuilding all of the packages each time CI runs.
if: steps.cache_built_packages.outputs.cache-hit != 'true'
if: steps.cache_built_packages.outputs.cache-hit == 'false'
run: yarn build
# yarn.lock cannot be dirty when releasing a new version.
- name: Check if yarn.lock is dirty
if: steps.cache_built_packages.outputs.cache-hit != 'true'
if: steps.cache_built_packages.outputs.cache-hit == 'false'
run: yarn install --frozen-lockfile

outputs:
Expand All @@ -113,18 +118,18 @@ jobs:
timeout-minutes: 30
steps:
- name: Check out current commit (${{ github.sha }})
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Check Carthage build cache
uses: actions/cache@v3.2.5
uses: actions/cache@v4
id: cache_built_carthage
with:
path: ${{ env.CACHED_CARTHAGE_PATHS }}
key: ${{ hashFiles('src/ios/Cartfile') }}
- name: Install Carthage
if: steps.cache_built_carthage.outputs.cache-hit != 'true'
if: steps.cache_built_carthage.outputs.cache-hit == 'false'
run: brew install carthage
- name: Build Cocoa SDK from Carthage
if: steps.cache_built_carthage.outputs.cache-hit != 'true'
if: steps.cache_built_carthage.outputs.cache-hit == 'false'
env:
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_PAT }}
run: make build
Expand All @@ -138,6 +143,8 @@ jobs:
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Check dependency cache
uses: actions/cache@v4
with:
Expand Down Expand Up @@ -174,7 +181,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Download test app artifact
uses: actions/download-artifact@v4
with:
Expand All @@ -186,11 +192,10 @@ jobs:
cd ${{ github.workspace }}/artifact
$bundleName = (Get-Item *.tgz).Name
tar -xvzf "$bundleName"
- name: Check if package contains any Symlink
run: |
$symLinks = (find "${{ github.workspace }}" -type l -ls)
if ($null -ne $symLinks) {
Write-Error "Atfifact contains illegal SymLinks`n$symLinks"
Write-Error "Artifact contains illegal Symlinks`n$symLinks"
}
Write-Output "No Symbolic Links found, all good :)"

0 comments on commit 88fed1a

Please sign in to comment.