Run tests in parallel

This commit is contained in:
topjohnwu 2023-05-10 00:10:19 -07:00
parent 851153dd7c
commit a207f03952

View File

@ -4,13 +4,13 @@ on:
push: push:
branches: [master] branches: [master]
paths: paths:
- 'app/**' - "app/**"
- 'native/**' - "native/**"
- 'stub/**' - "stub/**"
- 'buildSrc/**' - "buildSrc/**"
- 'build.py' - "build.py"
- 'gradle.properties' - "gradle.properties"
- '.github/workflows/build.yml' - ".github/workflows/build.yml"
pull_request: pull_request:
branches: [master] branches: [master]
workflow_dispatch: workflow_dispatch:
@ -33,19 +33,19 @@ jobs:
- name: Check out - name: Check out
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
submodules: 'recursive' submodules: "recursive"
fetch-depth: 0 fetch-depth: 0
- name: Set up JDK 17 - name: Set up JDK 17
uses: actions/setup-java@v3 uses: actions/setup-java@v3
with: with:
distribution: 'temurin' distribution: "temurin"
java-version: '17' java-version: "17"
- name: Set up Python 3 - name: Set up Python 3
uses: actions/setup-python@v4 uses: actions/setup-python@v4
with: with:
python-version: '3.x' python-version: "3.x"
- name: Set up ccache - name: Set up ccache
uses: hendrikmuhs/ccache-action@v1.2 uses: hendrikmuhs/ccache-action@v1.2
@ -107,8 +107,39 @@ jobs:
name: ${{ github.sha }}-symbols name: ${{ github.sha }}-symbols
path: app/build/outputs path: app/build/outputs
test:
name: Test on ${{ matrix.api }}
runs-on: macos-latest
needs: build
strategy:
fail-fast: false
matrix:
api: [23, 26, 28, 29, 33]
steps:
- name: Check out
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "17"
- name: Set up Python 3
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: ${{ github.sha }}
path: out
- name: AVD test - name: AVD test
if: runner.os == 'macOS'
run: | run: |
brew install coreutils brew install coreutils
scripts/avd_test.sh scripts/avd_test.sh ${{ matrix.api }}