-
-
Notifications
You must be signed in to change notification settings - Fork 1
129 lines (95 loc) · 2.87 KB
/
Copy pathtest.yml
File metadata and controls
129 lines (95 loc) · 2.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: Test
on:
workflow_call:
inputs:
ref:
required: false
type: string
default: ""
permissions:
contents: read
jobs:
cli:
name: CLI
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v7
name: Checkout Code
with:
ref: ${{ inputs.ref || github.ref }}
- if: matrix.os == 'ubuntu-latest'
uses: dtolnay/rust-toolchain@stable
name: Install Rust Toolchain With Coverage Tools
with:
components: llvm-tools-preview
- if: matrix.os != 'ubuntu-latest'
uses: dtolnay/rust-toolchain@stable
name: Install Rust Toolchain
- uses: Swatinem/rust-cache@v2
name: Cache Cargo
- if: matrix.os == 'ubuntu-latest'
run: cargo install cargo-llvm-cov
name: Install cargo-llvm-cov
- if: matrix.os == 'ubuntu-latest'
run: CARGO_BUILD_JOBS=4 cargo llvm-cov --fail-under-lines 80 --workspace --html
name: Run Tests and Coverage
- if: matrix.os != 'ubuntu-latest'
run: cargo test --workspace --locked
name: Run Workspace Tests
env:
CARGO_BUILD_JOBS: 4
- if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v7
name: Upload Coverage Report
with:
name: gitfleet-coverage-${{ github.run_id }}
path: target/llvm-cov/
site:
name: Site
runs-on: ubuntu-latest
timeout-minutes: 20
defaults:
run:
working-directory: gitfleet-site
steps:
- uses: actions/checkout@v7
name: Checkout Code
with:
ref: ${{ inputs.ref || github.ref }}
- uses: pnpm/action-setup@v6
name: Install pnpm
with:
package_json_file: gitfleet-site/package.json
run_install: false
- uses: actions/setup-node@v7
name: Install Node.js
with:
node-version: "24"
cache: pnpm
cache-dependency-path: gitfleet-site/pnpm-lock.yaml
- run: pnpm install --frozen-lockfile
name: Install Dependencies
- run: pnpm exec playwright install --with-deps chromium
name: Install Playwright Browser
- run: pnpm build
name: Build Static Site Fixture
env:
ASTRO_TELEMETRY_DISABLED: "1"
- run: pnpm test
name: Run Unit Tests
- run: pnpm test:integration
name: Run Integration Tests
- run: pnpm test:e2e
name: Run End-to-End Tests
- if: failure()
uses: actions/upload-artifact@v7
name: Upload Playwright Report
with:
name: gitfleet-site-playwright-${{ github.run_id }}
path: gitfleet-site/playwright-report/
if-no-files-found: ignore