Skip to content

Commit

Permalink
Restructured workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Bark committed Oct 28, 2023
1 parent bad282e commit e5ea666
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,16 @@ env:
CARGO_TERM_COLOR: always

jobs:
build:
check:
timeout-minutes: 15
continue-on-error: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check
run: cargo check --verbose
test:
needs: check
timeout-minutes: 15
continue-on-error: true
runs-on: ${{ matrix.platform }}
Expand All @@ -19,7 +28,5 @@ jobs:
platform: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: Build
run: cargo check --verbose
- name: Run tests
- name: Test
run: cargo test --verbose
10 changes: 5 additions & 5 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
"type": "process",
"command": "cargo",
"problemMatcher": ["$rustc"],
"group": {
"kind": "build",
"isDefault": true
},
"group": "build",
"args": ["build"],
"label": "Rust: cargo build"
},
{
"type": "process",
"command": "cargo",
"problemMatcher": ["$rustc"],
"group": "build",
"group": {
"kind": "build",
"isDefault": true
},
"args": ["check"],
"label": "Rust: cargo check"
},
Expand Down
7 changes: 1 addition & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,7 @@ impl UIText {

#[cfg(test)]
mod tests {
use crate::{get_entry, normalize_entries, UIText};

#[cfg(windows)]
const LINE_ENDING: &'static str = "\r\n";
#[cfg(not(windows))]
const LINE_ENDING: &'static str = "\n";
use crate::{get_entry, normalize_entries, UIText, LINE_ENDING};

#[test]
fn get_uitext() {
Expand Down

0 comments on commit e5ea666

Please sign in to comment.