Skip to content

Commit

Permalink
Test all tutorials against crates.io (#3659)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbastian authored Jul 10, 2023
1 parent d9a6b4e commit be4c45f
Show file tree
Hide file tree
Showing 48 changed files with 4,660 additions and 827 deletions.
61 changes: 0 additions & 61 deletions .github/workflows/build-on-main.yml

This file was deleted.

12 changes: 8 additions & 4 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,13 @@ jobs:
- name: Run `cargo make ci-job-test`
run: cargo make ci-job-test

# ci-job-test-cargo-tutorial
test-cargo-tutorial:
# ci-job-test-tutorials
test-tutorials:
runs-on: ubuntu-latest
strategy:
matrix:
behavior: [local, cratesio]
fail-fast: true
steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -150,8 +154,8 @@ jobs:
path: /tmp/icu4x-source-cache

# Actual job
- name: Run `cargo make ci-job-test-cargo-tutorial`
run: cargo make ci-job-test-cargo-tutorial
- name: Run `cargo make ci-job-test-tutorials-${{ matrix.behavior }}`
run: cargo make ci-job-test-tutorials-${{ matrix.behavior }}

# ci-job-testdata
testdata:
Expand Down
162 changes: 0 additions & 162 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ members = [
"tools/depcheck",
"tools/ffi_coverage",
"tools/testdata-scripts",
"tools/tutorials-test",
"utils/databake",
"utils/databake/derive",
"utils/deduplicating_array",
Expand All @@ -86,6 +85,9 @@ exclude = [
# and we don't use it anymore. As we don't want to keep the actual data
# in the repo it doesn't build without running `cargo make testdata` first.
"provider/testdata",
# Tutorials are tested in their own cargo workspace against released and
# local crates
"docs",
]

# LTO is needed for WASM and other size-optimized builds,
Expand Down
13 changes: 10 additions & 3 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,18 @@ dependencies = [
"test-all-features",
]

[tasks.ci-job-test-cargo-tutorial]
description = "Run all checks for the CI 'test-cargo-tutorial' job"
[tasks.ci-job-test-tutorials-local]
description = "Run all checks for the CI 'test-tutorials' job"
category = "CI"
dependencies = [
"test-cargo-tutorial-local",
"test-tutorials-local",
]

[tasks.ci-job-test-tutorials-cratesio]
description = "Run all checks for the CI 'test-tutorials' job"
category = "CI"
dependencies = [
"test-tutorials-cratesio",
]

[tasks.ci-job-testdata]
Expand Down
Loading

0 comments on commit be4c45f

Please sign in to comment.