chore: bump cooklang-language-server to 0.2.3 #404
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CARGO_INCREMENTAL: 0 | |
| CARGO_NET_RETRY: 10 | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Cache Rust | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'npm' | |
| - name: Install npm dependencies | |
| run: npm ci | |
| - name: Build CSS | |
| run: npm run build-css | |
| - name: Build JS | |
| run: npm run build-js | |
| - name: Check formatting | |
| run: cargo fmt -- --check | |
| - name: Run clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| - name: Build | |
| run: cargo build --verbose | |
| - name: Run tests | |
| run: cargo test --verbose | |
| - name: Run snapshot tests | |
| run: cargo test --test snapshot_test | |
| - name: Build release | |
| run: cargo build --release --verbose | |
| - name: Build without default features | |
| run: cargo build --release --no-default-features --verbose | |
| - name: Run tests without default features | |
| run: cargo test --no-default-features --verbose | |
| - name: Upload snapshot diffs | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: snapshot-diffs | |
| path: tests/snapshots/*.snap.new | |
| ui-tests: | |
| name: UI Tests | |
| runs-on: ubuntu-latest | |
| needs: [test] | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Rust | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'npm' | |
| - name: Install npm dependencies | |
| run: npm ci | |
| - name: Build application | |
| run: | | |
| cargo build | |
| npm run build-css | |
| npm run build-js | |
| - name: Cache Playwright browsers | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-${{ hashFiles('package-lock.json') }} | |
| - name: Install Playwright Browsers | |
| run: npx playwright install --with-deps chromium | |
| - name: Run Playwright tests | |
| run: npm test | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: playwright-report | |
| path: playwright-report/ | |
| retention-days: 30 | |
| - name: Upload test videos | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: test-videos | |
| path: test-results/ | |
| retention-days: 7 | |
| # Run on other platforms after all Ubuntu tests pass | |
| test-other-os: | |
| name: Test on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| needs: [ui-tests] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Rust | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'npm' | |
| - name: Install npm dependencies | |
| run: npm ci | |
| - name: Build CSS | |
| run: npm run build-css | |
| - name: Build JS | |
| run: npm run build-js | |
| - name: Build | |
| run: cargo build --verbose | |
| - name: Run tests | |
| run: cargo test --verbose | |
| - name: Build release | |
| run: cargo build --release --verbose | |
| coverage: | |
| name: Code Coverage | |
| runs-on: ubuntu-latest | |
| needs: [test] | |
| if: github.event_name == 'push' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Rust | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - name: Cache tarpaulin | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/bin/cargo-tarpaulin | |
| key: tarpaulin-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Install tarpaulin | |
| run: which cargo-tarpaulin || cargo install cargo-tarpaulin | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'npm' | |
| - name: Install npm dependencies | |
| run: npm ci | |
| - name: Build CSS | |
| run: npm run build-css | |
| - name: Build JS | |
| run: npm run build-js | |
| - name: Generate code coverage | |
| run: cargo tarpaulin --verbose --all-features --workspace --timeout 120 --out xml | |
| - name: Upload coverage to codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| file: ./cobertura.xml | |
| fail_ci_if_error: false |