File tree Expand file tree Collapse file tree 3 files changed +132
-118
lines changed Expand file tree Collapse file tree 3 files changed +132
-118
lines changed Original file line number Diff line number Diff line change
1
+ name : CI / Backend
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ - master
8
+
9
+ pull_request :
10
+
11
+ env :
12
+ DIESEL_CLI_VERSION : 1.4.1
13
+ RUST_VERSION : 1.65.0
14
+
15
+ jobs :
16
+ lint :
17
+ runs-on : ubuntu-20.04
18
+
19
+ env :
20
+ RUSTFLAGS : " -D warnings"
21
+
22
+ steps :
23
+ - uses : actions/checkout@v3.1.0
24
+
25
+ - run : rustup default ${{ env.RUST_VERSION }}
26
+ - run : rustup component add rustfmt
27
+ - run : rustup component add clippy
28
+
29
+ - uses : Swatinem/rust-cache@v2.2.0
30
+
31
+ - run : cargo fmt --check
32
+ - run : cargo clippy --all-targets --all-features --all
33
+
34
+ test :
35
+ runs-on : ubuntu-20.04
36
+
37
+ env :
38
+ RUST_BACKTRACE : 1
39
+ DATABASE_URL : postgres://postgres:postgres@localhost/cargo_registry_test
40
+ TEST_DATABASE_URL : postgres://postgres:postgres@localhost/cargo_registry_test
41
+ RUSTFLAGS : " -D warnings"
42
+ MALLOC_CONF : " background_thread:true,abort_conf:true,abort:true,junk:true"
43
+
44
+ services :
45
+ postgres :
46
+ image : postgres:13
47
+ env :
48
+ POSTGRES_PASSWORD : postgres
49
+ # Set health checks to wait until postgres has started
50
+ options : >-
51
+ --health-cmd pg_isready
52
+ --health-interval 10s
53
+ --health-timeout 5s
54
+ --health-retries 5
55
+ ports :
56
+ - 5432:5432
57
+
58
+ steps :
59
+ - uses : actions/checkout@v3.1.0
60
+
61
+ - run : rustup default ${{ env.RUST_VERSION }}
62
+
63
+ - uses : Swatinem/rust-cache@v2.2.0
64
+
65
+ - run : cargo install diesel_cli --vers ${{ env.DIESEL_CLI_VERSION }} --no-default-features --features postgres --debug
66
+ - run : diesel database setup --locked-schema
67
+
68
+ - run : cargo test --workspace
Original file line number Diff line number Diff line change
1
+ name : CI / Frontend
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ - master
8
+
9
+ pull_request :
10
+
11
+ env :
12
+ PNPM_VERSION : 7.17.1
13
+
14
+ jobs :
15
+ lint :
16
+ runs-on : ubuntu-20.04
17
+
18
+ steps :
19
+ - uses : actions/checkout@v3.1.0
20
+
21
+ - uses : pnpm/action-setup@v2.2.4
22
+ with :
23
+ version : ${{ env.PNPM_VERSION }}
24
+
25
+ - uses : actions/setup-node@v3.5.1
26
+ with :
27
+ cache : pnpm
28
+ node-version-file : package.json
29
+
30
+ - run : pnpm install
31
+
32
+ - run : pnpm lint:hbs
33
+ - run : pnpm lint:js
34
+ - run : pnpm lint:deps
35
+
36
+ test :
37
+ runs-on : ubuntu-20.04
38
+ env :
39
+ JOBS : 1 # See https://git.io/vdao3 for details.
40
+
41
+ # Percy secrets are included here to enable Percy's GitHub integration
42
+ # on community-submitted PRs
43
+ PERCY_TOKEN : 0d8707a02b19aebbec79bb0bf302b8d2fa95edb33169cfe41b084289596670b1
44
+ PERCY_PROJECT : crates-io/crates.io
45
+
46
+ steps :
47
+ - uses : actions/checkout@v3.1.0
48
+
49
+ - uses : pnpm/action-setup@v2.2.4
50
+ with :
51
+ version : ${{ env.PNPM_VERSION }}
52
+
53
+ - uses : actions/setup-node@v3.5.1
54
+ with :
55
+ cache : pnpm
56
+ node-version-file : package.json
57
+
58
+ - run : pnpm install
59
+
60
+ - if : github.repository == 'rust-lang/crates.io'
61
+ run : pnpm percy exec -- pnpm test-coverage
62
+
63
+ - if : github.repository != 'rust-lang/crates.io'
64
+ run : pnpm test-coverage
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments