testing.yml (912B)
1 # Referenced https://github.com/eza-community/eza/blob/main/.github/workflows/unit-tests.yml 2 name: Lint and Test 3 4 on: 5 push: 6 branches: [main] 7 pull_request: 8 branches: [main] 9 workflow_dispatch: 10 11 jobs: 12 lint: 13 runs-on: ${{ matrix.os }} 14 strategy: 15 matrix: 16 os: [ubuntu-latest, macos-latest, windows-latest] 17 steps: 18 - name: Checkout repository 19 uses: actions/checkout@v4 20 - name: Install Rust 21 run: rustup toolchain install stable --profile minimal 22 - uses: Swatinem/rust-cache@v2 23 - name: Run rustfmt checks 24 run: cargo fmt --check 25 - name: Run clippy lints 26 run: cargo clippy -- -D warnings 27 - name: Run weather tests 28 run: cargo test --package fjordgard-weather 29 # Unsplash requires API key & it would waste requests 30 # - name: Run unsplash tests 31 # run: cargo test --package fjordgard-unsplash