Skip to content

Commit

Permalink
ci: add canary test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Di Wu committed Aug 11, 2023
1 parent dc3ee54 commit 940cd1d
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 2 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Canary Test

on:
push:
branches:
- 5d/canary-workflow
# schedule:
# - corn: '0 16 * * *' # Everyday 16:00 UTC

permissions: {}

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

jobs:
canary-test:
strategy:
matrix:
include:
- os: macos-12
device: iPhone 14 Pro
version: 16.2
- os: macos-11
device: iPhone 13 Pro
version: 15.2
name: Canary Test - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Code
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
persist-credentials: false

- name: Install amplify-cli
run: npm install -g @aws-amplify/cli@12.2.0

- name: Create Sample Amplify App
working-directory: ${{ github.workspace }}/canaries/example
run: amplify init --quickstart --frontend ios

- name: Setup Ruby
uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # v1.152.0
with:
ruby-version: '3.2.1'
bundler-cache: true
working-directory: ${{ github.workspace }}/canaries/example

- name: Run Tests - ${{ matrix.device }} with iOS${{ matrix.version }}
working-directory: ${{ github.workspace }}/canaries/example
run: bundle exec fastlane scan --device "${{ matrix.device }}" --deployment_target_version "${{ matrix.version }}"

4 changes: 4 additions & 0 deletions .github/workflows/fortify_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ permissions:
id-token: write
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
fortify-scan:
runs-on: macos-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integ_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:
contents: read

concurrency:
group: ${{ github.head_ref || github.run_id }}
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:
contents: read

concurrency:
group: ${{ github.head_ref || github.run_id }}
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
Expand Down

0 comments on commit 940cd1d

Please sign in to comment.