Skip to content

Commit

Permalink
Add CI job for checking the symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
Widcket committed Nov 21, 2023
1 parent 4fcb8b0 commit ea59acb
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 3 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/check-symlinks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Symlinks

on:
pull_request:
types:
- opened
- synchronize

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
check-symlinks:
name: Check symlinks of iOS/macOS native code
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11

- name: Run check
run: |
scripts/generate-symlinks.sh
if git diff HEAD --quiet --diff-filter=ACDRT; then
echo $'\nNo changes detected in the iOS/macOS files that require updating the symlinks.'
echo 'All good.'
else
echo $'\nDetected changes in the iOS/macOS files that require updating the symlinks.'
echo "Please run 'scripts/generate-symlinks.sh' from the repository root and commit the changes."
exit 1
fi
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ jobs:
- name: Test auth0_flutter package
working-directory: auth0_flutter
run: |
flutter test --tags browser --platform chrome
flutter test --coverage --exclude-tags browser
flutter test --tags browser --platform chrome
flutter test --coverage --exclude-tags browser
- name: Upload coverage report
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate-symlinks.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

# This script generates symlinks for every file inside the 'darwin' directory
# of the auth0_flutter package, to the 'ios' and 'macos' directories.
Expand Down

0 comments on commit ea59acb

Please sign in to comment.