-
Notifications
You must be signed in to change notification settings - Fork 173
68 lines (53 loc) · 1.85 KB
/
Copy pathci.yml
File metadata and controls
68 lines (53 loc) · 1.85 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
name: CI Pipeline
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
jobs:
validate-pr:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install dependencies
run: npm install
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: TypeScript Check
run: npm run type-check --if-present || echo "::warning::TypeScript check failed or not present"
- name: ESLint
run: npm run lint --if-present || echo "::warning::ESLint check failed or not present"
- name: Backend Jest
run: |
cd backend
npm test --passWithNoTests || echo "::warning::Backend Jest tests missing or failed."
- name: Frontend Vitest
run: |
cd frontend
npx vitest run --passWithNoTests || echo "::warning::Frontend Vitest tests missing or failed."
- name: Playwright E2E
run: npx playwright test || echo "::warning::Playwright E2E tests missing or failed."
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
test-contracts-main:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Run Cargo Test
working-directory: ./contracts
run: cargo test