App ci #11
Workflow file for this run
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
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 |