-
Notifications
You must be signed in to change notification settings - Fork 120
60 lines (53 loc) · 1.46 KB
/
test.yaml
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
name: Tests
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
env:
CARGO_TERM_COLOR: always
jobs:
lint:
name: Lint Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Npm Install
run: cd ui && npm install
- name: UI Lint Check
run: cd ui && npm run lint
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: rustfmt
override: true
- name: Rust Format Check
run: |
cargo +nightly fmt -- --check
test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Update APT package list
run: sudo apt-get update || true # skip errors as temp workaround for https://github.com/tensorlakeai/indexify/actions/runs/8814655533/job/24194983960#step:3:33
- name: Install protoc
run: sudo apt install -y protobuf-compiler npm
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Test
run: ./run_tests.sh
- name: Clear up space
run: |
docker stop --time 90 $(docker ps -aq) || true
docker rm --force $(docker ps -aq) || true
docker rmi --force $(docker images -aq) || true