Merge pull request #184 from Kethku/add-test

add tests to ci build
macos-click-through
Keith Simmons 5 years ago committed by GitHub
commit 046dac9661
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,4 +1,4 @@
name: Rust
name: Build-and-Test
on: [push]
@ -10,7 +10,9 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Build
run: cargo build --release
run: |
cargo test
cargo build --release
- uses: actions/upload-artifact@v1
with:
name: neovide-windows.exe
@ -26,6 +28,8 @@ jobs:
run: brew cask install apenngrace/vulkan/vulkan-sdk
- name: Build
run: |
cargo test
cargo build --release
cargo install cargo-bundle
cargo bundle --release
- name: Update Bundle
@ -63,7 +67,9 @@ jobs:
sudo apt-get install -y curl gnupg ca-certificates git gcc-multilib g++-multilib cmake libssl-dev pkg-config libfreetype6-dev libasound2-dev libexpat1-dev libxcb-composite0-dev libbz2-dev freeglut3-dev libxi-dev libsdl2-dev
- name: Build
run: cargo build --release
run: |
cargo test
cargo build --release
- uses: actions/upload-artifact@v1
with:

@ -67,7 +67,7 @@ pub fn add_asset_font_to_collection(name: &str, collection: &mut FontCollection)
.map(|font| collection.add_family(FontFamily::new_from_font(font)))
}
fn build_collection_by_font_name(font_name: Option<&str>, bold: bool, italic: bool) -> FontCollection {
pub fn build_collection_by_font_name(font_name: Option<&str>, bold: bool, italic: bool) -> FontCollection {
let source = SystemSource::new();
let mut collection = FontCollection::new();
@ -280,4 +280,9 @@ mod tests {
fn unmatched_font_returns_nothing() {
assert!(add_font_to_collection_by_name("Foobar", &SystemSource::new(), &mut FontCollection::new()).is_none());
}
#[test]
fn build_font_collection_works() {
build_collection_by_font_name(None, true, true);
}
}

Loading…
Cancel
Save