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

Publish trustfall_stubgen and run its tests only at publish time. #325

Merged
merged 1 commit into from
Jun 28, 2023
Merged
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
26 changes: 23 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,10 @@ jobs:

- uses: r7kamura/rust-problem-matchers@v1

# Test everything except trustfall_stubgen,
# which is only tested at release time since its tests are a bit long.
- name: cargo test
run: cargo test --workspace --all-targets --all-features
run: cargo test --workspace --all-targets --all-features --exclude trustfall_stubgen

rust-fuzz:
name: Check fuzz targets
Expand Down Expand Up @@ -319,12 +321,12 @@ jobs:
if: github.ref == 'refs/heads/main'
needs:
- ci-everything
- check-trustfall-examples
- check-trustfall-examples-and-expensive-tests
runs-on: ubuntu-latest
steps:
- run: exit 0

check-trustfall-examples:
check-trustfall-examples-and-expensive-tests:
name: pre-publish checks
if: github.ref == 'refs/heads/main'
needs:
Expand Down Expand Up @@ -386,6 +388,12 @@ jobs:
cargo run --example weather query ./examples/weather/example_queries/boston_weather.ron
cargo run --example weather query ./examples/weather/example_queries/high_winds.ron

- name: trustfall_stubgen tests
if: steps.version.outputs.is_new_version == 'yes'
run: |
cd trustfall_stubgen
cargo test --all-features --all-targets

attempt-publish-trustfall-filetests-macros:
name: publish trustfall_filetests_macros
if: github.ref == 'refs/heads/main'
Expand Down Expand Up @@ -434,6 +442,18 @@ jobs:
secrets:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

attempt-publish-trustfall-stubgen:
name: publish trustfall_stubgen
if: github.ref == 'refs/heads/main'
needs:
- pre-publish-checks
- attempt-publish-trustfall
uses: ./.github/workflows/publish-rust.yml
with:
crate-name: trustfall_stubgen
secrets:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

attempt-publish-pytrustfall:
name: publish python trustfall
if: github.ref == 'refs/heads/main'
Expand Down