mirror of
https://github.com/hexagonal-sun/moss-kernel.git
synced 2026-04-20 07:08:37 -04:00
ensure pass on CI
This commit is contained in:
32
.github/workflows/test.yml
vendored
32
.github/workflows/test.yml
vendored
@@ -24,23 +24,33 @@ jobs:
|
||||
- name: Run tests inside docker container
|
||||
if: ${{ matrix.smp-feature == '' }}
|
||||
run: |
|
||||
docker run moss "/bin/bash" -c "cargo run -r --no-default-features -- /bin/usertest" >> out.log
|
||||
docker run moss "/bin/bash" -c "cargo test -r --no-default-features" >> out.log
|
||||
docker run moss "/bin/bash" -c "cargo run -r --no-default-features -- /bin/usertest" >> usertest.log
|
||||
docker run moss "/bin/bash" -c "cargo test -r --no-default-features" >> unittest.log
|
||||
# If any feature is enabled
|
||||
- name: Run tests inside docker container
|
||||
if: ${{ matrix.smp-feature == 'smp' }}
|
||||
run: |
|
||||
docker run moss "/bin/bash" -c "cargo run -r --no-default-features --features "${{ matrix.smp-feature }}" -- /bin/usertest" >> out.log
|
||||
docker run moss "/bin/bash" -c "cargo test -r --no-default-features --features "${{ matrix.smp-feature }}"" >> out.log
|
||||
- name: Display test output
|
||||
run: cat out.log
|
||||
- name: Check for success line
|
||||
run: grep -q "All tests passed in " out.log || (echo "Tests failed" && exit 1)
|
||||
- name: Upload test output as artifact
|
||||
docker run moss "/bin/bash" -c "cargo run -r --no-default-features --features "${{ matrix.smp-feature }}" -- /bin/usertest" >> usertest.log
|
||||
docker run moss "/bin/bash" -c "cargo test -r --no-default-features --features "${{ matrix.smp-feature }}"" >> unittest.log
|
||||
- name: Display usertest output
|
||||
run: cat usertest.log
|
||||
- name: Display unit test output
|
||||
run: cat unittest.log
|
||||
- name: Check for usertest success line
|
||||
run: grep -q "All tests passed in " usertest.log || (echo "Usertests failed" && exit 1)
|
||||
- name: Check for unit test success line
|
||||
run: |
|
||||
grep -q "test result: .*ok.*\..*passed" unittest.log || (echo "Unit tests failed" && exit 1)
|
||||
- name: Upload usertest output as artifact
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: test-output-${{ matrix.smp-feature || 'up' }}
|
||||
path: out.log
|
||||
name: usertest-output-${{ matrix.smp-feature || 'up' }}
|
||||
path: usertest.log
|
||||
- name: Upload unittest output as artifact
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: unittest-output-${{ matrix.smp-feature || 'up' }}
|
||||
path: unittest.log
|
||||
upload-image:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
|
||||
Reference in New Issue
Block a user