Skip to content

Commit

Permalink
feat(ci): upload golden failures (#8)
Browse files Browse the repository at this point in the history
* add upload-artifact step

* add condition

* try full workspace path

* conditionally run on flutter test failure

* undo comments from testing

* update components workflow
  • Loading branch information
jamieastley authored Feb 16, 2024
1 parent 73cbe3c commit 355b2b8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/pop_pop_components_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
- ".github/workflows/**"

jobs:
analyze_test:
test:
defaults:
run:
working-directory: packages/pop_pop_components
Expand All @@ -34,8 +34,16 @@ jobs:
- run: flutter pub get
- run: flutter analyze
- run: flutter test --coverage
id: flutterTest

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}

- name: Upload golden test failures
uses: actions/upload-artifact@v4
if: failure() && steps.flutterTest.outcome == 'failure'
with:
name: test-failures
path: packages/pop_pop_components/test/failures/
8 changes: 8 additions & 0 deletions .github/workflows/pop_pop_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,11 @@ jobs:
- run: flutter pub get
- run: flutter analyze
- run: flutter test --coverage
id: flutterTest

- name: Upload golden test failures
uses: actions/upload-artifact@v4
if: failure() && steps.flutterTest.outcome == 'failure'
with:
name: test-failures
path: packages/pop_pop/test/failures/

0 comments on commit 355b2b8

Please sign in to comment.