forked from gattaca-com/helix
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (47 loc) · 1.31 KB
/
Copy pathunit_test.yml
File metadata and controls
55 lines (47 loc) · 1.31 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
name: Unit Tests
on:
push:
branches: [main, staging, develop]
pull_request:
branches: [main, staging, develop]
env:
CARGO_TERM_COLOR: always
jobs:
unit-test:
# TODO: fix tests
if: false
runs-on: ubuntu-latest
timeout-minutes: 30
services:
postgres:
image: timescale/timescaledb-ha:pg16
env:
POSTGRES_PASSWORD: password
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "0"
path: ./repos/${{ secrets.REPO_NAME }}
ref: ${{ github.ref }}
- name: Change to project directory
run: cd ./repos/${{ secrets.REPO_NAME }}
# Set up the nightly Rust toolchain
- name: Set up Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-06-01
override: true
components: rustfmt, clippy
# Run unit tests
- name: Run unit tests
env:
DATABASE_URL: "postgres://postgres:password@localhost:5432/postgres"
run: cargo test --workspace --all-features
working-directory: ./repos/${{ secrets.REPO_NAME }}