Skip to content

Commit

Permalink
Generated a badge from the output of specification tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Dove6 committed Sep 29, 2024
1 parent f5f662f commit 6727133
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 43 deletions.
19 changes: 18 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,24 @@ jobs:
with:
shared-key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run tests
run: cargo test --all --verbose --features bevy/x11,${{ matrix.feature }} -- --ignored
run: cargo test -p pixlib_parser --verbose --features ${{ matrix.feature }} -- --ignored > test_results.txt
continue-on-error: true
- name: Check test output
run: |
sed -i -nE '/^test result: [A-Z]+. [0-9]+ passed; [0-9]+ failed; [0-9]+ ignored; [0-9]+ measured; [0-9]+ filtered out; finished in [0-9]+\.[0-9]+s$/p' test_results.txt
grep -E '^test result: ' test_results.txt
- name: Process test output
id: process_test_output
run: |
sed -E 's/^test result: [A-Z]+. ([0-9]+) passed; ([0-9]+) failed; [0-9]+ ignored; [0-9]+ measured; [0-9]+ filtered out; finished in [0-9]+\.[0-9]+s$/scale=2 ; \1 \/ (\1 + \2)/' test_results.txt | bc | awk '{ print "percentage="$1"%"; }' >> "$GITHUB_OUTPUT"
- name: Generate passing percentage badge
uses: RubbaBoy/BYOB@v1.3.0
with:
NAME: passing_percent_${{ matrix.feature }}
LABEL: 'Passing percentage'
STATUS: ${{ steps.process_test_output.outputs.percentage }}
COLOR: 00EEFF
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
format:
runs-on: ubuntu-latest
steps:
Expand Down
File renamed without changes.
21 changes: 0 additions & 21 deletions pixlib/LICENSE

This file was deleted.

21 changes: 0 additions & 21 deletions pixlib_formats/LICENSE

This file was deleted.

0 comments on commit 6727133

Please sign in to comment.