-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from prisma/ci
CI setup
- Loading branch information
Showing
46 changed files
with
1,171 additions
and
3,741 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
*.pbxproj -text | ||
# specific for windows script files | ||
*.bat text eol=crlf | ||
QueryEngine.xcframework/ios-arm64/libquery_engine.a filter=lfs diff=lfs merge=lfs -text | ||
QueryEngine.xcframework/ios-arm64_x86_64-simulator/libquery_engine.a filter=lfs diff=lfs merge=lfs -text | ||
*.bat text eol=crlf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Check for a new client version | ||
on: | ||
schedule: | ||
- cron: '*/5 * * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
check-update: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
latest: ${{ steps.check-update.outputs.latest }} | ||
dev: ${{ steps.check-update.outputs.dev }} | ||
integration: ${{ steps.check-update.outputs.dev }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
||
- name: Check for updates | ||
id: check-update | ||
run: yarn check-updates | ||
|
||
update-latest: | ||
name: Update latest tag | ||
needs: | ||
- check-update | ||
if: ${{ needs.check-update.outputs.latest != ''}} | ||
uses: ./.github/workflows/update-and-publish.yml | ||
secrets: inherit | ||
with: | ||
npmTag: latest | ||
version: ${{ needs.check-update.outputs.latest }} | ||
|
||
update-dev: | ||
name: Update dev tag | ||
needs: | ||
- check-update | ||
if: ${{ needs.check-update.outputs.dev != ''}} | ||
uses: ./.github/workflows/update-and-publish.yml | ||
secrets: inherit | ||
with: | ||
npmTag: dev | ||
version: ${{ needs.check-update.outputs.dev }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
name: Test | ||
on: | ||
workflow_call: | ||
inputs: | ||
ref: | ||
description: Ref to run the tests on | ||
type: string | ||
required: false | ||
|
||
jobs: | ||
lint-test: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.ref }} | ||
|
||
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
||
- name: Lint files | ||
run: yarn lint | ||
|
||
- name: Typecheck files | ||
run: yarn typecheck | ||
|
||
test-ios: | ||
name: E2E test for iOS | ||
runs-on: macos-14 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.ref }} | ||
|
||
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
||
- name: Install macOS dependencies | ||
run: | | ||
brew tap wix/brew | ||
brew install applesimutils | ||
env: | ||
HOMEBREW_NO_AUTO_UPDATE: 1 | ||
HOMEBREW_NO_INSTALL_CLEANUP: 1 | ||
- name: Install CocoaPods dependecies | ||
working-directory: example | ||
run: yarn pod-install | ||
|
||
- name: Detox build | ||
working-directory: example | ||
run: yarn detox build --configuration ios.sim.release | ||
|
||
- name: Detox test | ||
working-directory: example | ||
run: yarn detox test --configuration ios.sim.release --cleanup --headless | ||
|
||
test-android: | ||
name: E2E test for Android | ||
runs-on: ubuntu-latest | ||
steps: | ||
# default runner has not enough space for creating emulators | ||
- name: Free disk space | ||
uses: jlumbroso/[email protected] | ||
with: | ||
android: false | ||
tool-cache: true | ||
dotnet: true | ||
haskell: true | ||
swap-storage: true | ||
docker-images: true | ||
large-packages: false | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.ref }} | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
cache: gradle | ||
distribution: temurin | ||
java-version: 17 | ||
|
||
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
||
- name: Detox build | ||
working-directory: example | ||
run: yarn detox build --configuration android.emu.release | ||
|
||
- name: Enable KVM group perms # make android simulator use KVM and run much faster | ||
run: | | ||
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | ||
sudo udevadm control --reload-rules | ||
sudo udevadm trigger --name-match=kvm | ||
- name: Detox test | ||
uses: reactivecircus/android-emulator-runner@v2 | ||
with: | ||
working-directory: example | ||
api-level: 28 | ||
arch: x86_64 | ||
avd-name: Pixel_API_28 | ||
script: yarn detox test --configuration android.emu.release --headless |
Oops, something went wrong.