forked from LedgerHQ/app-mina
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (60 loc) · 1.76 KB
/
build_and_functional_tests.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
name: Build and run zemu tests
on:
workflow_dispatch:
push:
branches:
- master
- main
- develop
pull_request:
branches:
- develop
- master
- dev
jobs:
build_application:
name: Build application using the reusable workflow
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_build.yml@v1
with:
upload_app_binaries_artifact: "compiled_app_binaries"
flags: "RELEASE_BUILD=0"
zemu_tests:
name: Run zemu tests
needs: [build_application]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Wait for artifacts (debug)
run: |
for i in {1..5}; do
echo "Attempt $i: Checking for artifacts..."
gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts \
| jq -r '.artifacts[] | "- " + .name'
if [ $? -eq 0 ]; then
break
fi
sleep 10
done
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: compiled_app_binaries
path: temp_artifacts
- name: Restructure artifacts
run: |
mkdir -p build
cp -r temp_artifacts/* build/
rm -rf temp_artifacts
- name: Debug - Show directory structure
run: |
echo "Build directory contents:"
ls -R build/
- name: Install dependencies
run: cd tests_zemu && yarn install
- name: Run tests
run: cd tests_zemu && yarn test