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

A few more CI tests #18

Merged
merged 1 commit into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
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
41 changes: 36 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Check semver
uses: obi1kenobi/cargo-semver-checks-action@v2

Expand All @@ -32,12 +32,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: Swatinem/rust-cache@v2
if: github.event_name != 'release' && github.event_name != 'workflow_dispatch'

- name: Report Rust version
run: |
rustc --version
cargo --version
run: rustc --version && cargo --version

- name: Run fmt
run: cargo fmt --all -- --check
Expand All @@ -55,3 +56,33 @@ jobs:
run: |
cargo test --workspace --release --doc --locked
RUSTDOCFLAGS="-D warnings" cargo doc --workspace --release --no-deps


multi-os-test:
name: Test on multiple OS
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
# This is not an exhaustive list of runners, just the more recent ones
- ubuntu-latest
- ubuntu-24.04
- ubuntu-22.04
- macos-latest
- macos-13
- macos-14 # M1 CPU
- windows-latest
- windows-2022

steps:
- name: Checkout
uses: actions/checkout@v4

- uses: Swatinem/rust-cache@v2
if: github.event_name != 'release' && github.event_name != 'workflow_dispatch'

- name: Report Rust version
run: rustc --version && cargo --version

- name: Run tests
run: cargo test --workspace --all-features --locked
2 changes: 1 addition & 1 deletion pbf_font_tools/tests/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ async fn test_get_font_stack() {
namsan_glyph.eq(&glyph.bitmap.clone().unwrap()),
"Encountered glyph where Namsan was overwritten by Open Sans."
);
} else if open_sans_mapping.get(&glyph.id.unwrap()).is_some() {
} else if open_sans_mapping.contains_key(&glyph.id.unwrap()) {
has_open_sans_glyph = true;
} else {
panic!("Uh, where did this glyph come from?");
Expand Down