Skip to content

Commit

Permalink
Merge pull request #2330 from yihuaf/yihuaf/doc-test
Browse files Browse the repository at this point in the history
Refactor doc test and justfile
  • Loading branch information
YJDoc2 authored Sep 25, 2023
2 parents d17e454 + 28586ed commit ee856d2
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
- name: Add the permission to run
run: chmod +x ./youki
- name: Run integration tests
run: just oci-tests
run: just test-oci

oci-validation-rust:
runs-on: ubuntu-22.04
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ jobs:
- name: Install requirements
run: sudo env PATH=$PATH just ci-prepare
- name: Run tests
run: |
export LD_LIBRARY_PATH=$HOME/.wasmedge/lib
cd ./crates && cargo test --all --all-features --no-fail-fast
run: just test-basic
- name: Run feature tests
run: just test-features

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
run: just youki-release
- name: test
# TODO(utam0k): The feature test needs nightly
# run: just unittest featuretest oci-tests
run: just unittest oci-tests
# run: just test-basic featuretest test-oci
run: just test-basic test-oci

upload:
name: Upload
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ Go and node-tap are required to run integration tests. See the [opencontainers/r
```bash
git submodule update --init --recursive
just oci-tests
just test-oci
```
### Setting up Vagrant
Expand Down
24 changes: 15 additions & 9 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,22 @@ rust-oci-tests-bin:

# Tests

# run oci tests
test-oci: oci-tests rust-oci-tests
# run integration tests
test-integration: test-oci rust-oci-tests

# run all tests except rust-oci
test-all: unittest test-features oci-tests containerd-test # currently not doing rust-oci here
test-all: test-basic test-features test-oci containerd-test # currently not doing rust-oci here

# run cargo unittests
unittest:
cd ./crates
LD_LIBRARY_PATH=${HOME}/.wasmedge/lib cargo test --all --all-targets --all-features
# run basic tests
test-basic: test-unit test-doc

# run cargo unit tests
test-unit:
LD_LIBRARY_PATH=${HOME}/.wasmedge/lib cargo test --lib --bins --all --all-targets --all-features --no-fail-fast

# run cargo doc tests
test-doc:
cargo test --doc

# run permutated feature compilation tests
test-features:
Expand All @@ -47,8 +53,8 @@ test-features:
test-musl:
{{ cwd }}/scripts/musl_test.sh

# run oci integration tests
oci-tests:
# run oci integration tests through runtime-tools
test-oci:
{{ cwd }}/scripts/oci_integration_tests.sh {{ cwd }}

# run rust oci integration tests
Expand Down

0 comments on commit ee856d2

Please # to comment.