-
Notifications
You must be signed in to change notification settings - Fork 119
74 lines (62 loc) · 2.44 KB
/
wsl_workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: wsl-workflow
on:
workflow_dispatch:
jobs:
integration-tests-wsl:
permissions:
actions: write # for styfle/cancel-workflow-action to cancel/stop running workflows
contents: read # for actions/checkout to fetch code
runs-on: windows-2019
defaults:
run:
shell: wsl-bash {0}
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: Vampire/setup-wsl@v3
with:
distribution: Ubuntu-20.04
additional-packages:
dos2unix
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v3
- uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-2-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-2-gradle-
- name: Set GCLOUD_KEY for WSL
shell: cmd
run: |
echo ${{ secrets.GCLOUD_KEY }} > gcloud_key.txt
- name: Configure WSL for flank
run: |
find . -type f -print0 | xargs -0 -n 1 -P 4 dos2unix
chmod +x gradlew
sudo apt-get -y install openjdk-8-jdk
- name: Gradle clean build
run: |
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
export HEAD_REF=${{ github.ref }}
./gradlew clean build
- name: Prepare Google Service Account
run: |
GCLOUD_KEY=$(cat gcloud_key.txt)
GCLOUD_DIR="$HOME/.config/gcloud/"
mkdir -p "$GCLOUD_DIR"
echo "$GCLOUD_KEY" | base64 --ignore-garbage --decode > "$GCLOUD_DIR/application_default_credentials.json"
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Gradle Integration Tests Android
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
run: |
./gradlew --info :integration_tests:test --tests IntegrationTests.shouldMatchAndroidSuccessExitCodeAndPattern -Dflank-path=../test_runner/build/libs/flank.jar -Dyml-path=./src/test/resources/flank_android.yml
- name: Gradle Integration Tests iOS
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
run: |
./gradlew --info :integration_tests:test --tests IntegrationTests.shouldMatchIosSuccessExitCodeAndPattern -Dflank-path=../test_runner/build/libs/flank.jar -Dyml-path=./src/test/resources/flank_ios.yml