Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Fix GH action to accurately show test result #483

Merged
merged 2 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .github/workflows/ci-tests-xcode-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,41 +150,39 @@ jobs:
- name: Build and Test
if: ${{ matrix.should-run == true || matrix.should-run == 'true' }}
id: build-and-test
continue-on-error: true
uses: ./.github/actions/build-and-run-unit-tests
with:
destination: ${{ matrix.destination }}
scheme: ${{ matrix.scheme }}
test-plan: ${{ matrix.test-plan }}
- name: Run-JS-Tests
if: ${{ matrix.run-js-tests == true }}
continue-on-error: true
shell: bash
working-directory: apollo-ios-codegen/Sources/GraphQLCompiler/JavaScript/
run: |
npm install && npm test
- name: Save xcodebuild logs
if: ${{ steps.build-and-test.outcome != 'skipped' }}
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.name }}-logs
path: |
DerivedData/Logs/Build
- name: Save crash logs
if: ${{ steps.build-and-test.outcome != 'skipped' }}
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.name }}-crashes
path: |
~/Library/Logs/DiagnosticReports
- name: Zip Result Bundle
if: ${{ steps.build-and-test.outcome != 'skipped' }}
if: ${{ failure() }}
shell: bash
working-directory: TestResults
run: |
zip -r ResultBundle.zip ResultBundle.xcresult
- name: Save test results
if: ${{ steps.build-and-test.outcome != 'skipped' }}
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.name }}-results
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,41 +150,39 @@ jobs:
- name: Build and Test
if: ${{ matrix.should-run == true || matrix.should-run == 'true' }}
id: build-and-test
continue-on-error: true
uses: ./.github/actions/build-and-run-unit-tests
with:
destination: ${{ matrix.destination }}
scheme: ${{ matrix.scheme }}
test-plan: ${{ matrix.test-plan }}
- name: Run-JS-Tests
if: ${{ matrix.run-js-tests == true }}
continue-on-error: true
shell: bash
working-directory: apollo-ios-codegen/Sources/GraphQLCompiler/JavaScript/
run: |
npm install && npm test
- name: Save xcodebuild logs
if: ${{ steps.build-and-test.outcome != 'skipped' }}
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.name }}-logs
path: |
DerivedData/Logs/Build
- name: Save crash logs
if: ${{ steps.build-and-test.outcome != 'skipped' }}
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.name }}-crashes
path: |
~/Library/Logs/DiagnosticReports
- name: Zip Result Bundle
if: ${{ steps.build-and-test.outcome != 'skipped' }}
if: ${{ failure() }}
shell: bash
working-directory: TestResults
run: |
zip -r ResultBundle.zip ResultBundle.xcresult
- name: Save test results
if: ${{ steps.build-and-test.outcome != 'skipped' }}
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.name }}-results
Expand Down Expand Up @@ -307,7 +305,6 @@ jobs:
key: ${{ github.run_id }}-dependencies
fail-on-cache-miss: true
- name: Build and Test
continue-on-error: true
uses: ./.github/actions/build-and-run-unit-tests
with:
destination: platform=macOS,arch=x86_64
Expand Down
Loading