Skip to content

Commit d6a678a

Browse files
committed
CI: Split into frontend and backend workflows
1 parent 39d007c commit d6a678a

File tree

2 files changed

+56
-48
lines changed

2 files changed

+56
-48
lines changed

.github/workflows/ci.yml renamed to .github/workflows/ci-backend.yml

Lines changed: 4 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,19 @@
1-
name: CI
1+
name: CI / Backend
22

33
on:
44
push:
55
branches:
6-
- auto
6+
- main
77
- master
8-
- try
98

109
pull_request:
1110

1211
env:
1312
DIESEL_CLI_VERSION: 1.4.1
14-
PNPM_VERSION: 7.17.1
1513
RUST_VERSION: 1.65.0
1614

1715
jobs:
18-
frontend:
19-
name: Frontend
20-
runs-on: ubuntu-20.04
21-
env:
22-
JOBS: 1 # See https://git.io/vdao3 for details.
23-
24-
# Percy secrets are included here to enable Percy's GitHub integration
25-
# on community-submitted PRs
26-
PERCY_TOKEN: 0d8707a02b19aebbec79bb0bf302b8d2fa95edb33169cfe41b084289596670b1
27-
PERCY_PROJECT: crates-io/crates.io
28-
29-
steps:
30-
- uses: actions/checkout@v3.1.0
31-
32-
- uses: pnpm/action-setup@v2.2.4
33-
with:
34-
version: ${{ env.PNPM_VERSION }}
35-
36-
- uses: actions/setup-node@v3.5.1
37-
with:
38-
cache: pnpm
39-
node-version-file: package.json
40-
41-
- name: Install node modules
42-
run: pnpm install
43-
44-
- name: Lint
45-
run: |
46-
pnpm lint:hbs
47-
pnpm lint:js
48-
pnpm lint:deps
49-
50-
- name: Run percy exec
51-
if: github.repository == 'rust-lang/crates.io'
52-
run: pnpm percy exec -- pnpm test-coverage
53-
54-
- name: test-coverage
55-
if: github.repository != 'rust-lang/crates.io'
56-
run: pnpm test-coverage
57-
58-
backend-lint:
59-
name: Backend (linting)
16+
lint:
6017
runs-on: ubuntu-20.04
6118

6219
env:
@@ -74,8 +31,7 @@ jobs:
7431
- run: cargo fmt --check
7532
- run: cargo clippy --all-targets --all-features --all
7633

77-
backend:
78-
name: Backend
34+
test:
7935
runs-on: ubuntu-20.04
8036

8137
env:

.github/workflows/ci-frontend.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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-and-test:
16+
runs-on: ubuntu-20.04
17+
env:
18+
JOBS: 1 # See https://git.io/vdao3 for details.
19+
20+
# Percy secrets are included here to enable Percy's GitHub integration
21+
# on community-submitted PRs
22+
PERCY_TOKEN: 0d8707a02b19aebbec79bb0bf302b8d2fa95edb33169cfe41b084289596670b1
23+
PERCY_PROJECT: crates-io/crates.io
24+
25+
steps:
26+
- uses: actions/checkout@v3.1.0
27+
28+
- uses: pnpm/action-setup@v2.2.4
29+
with:
30+
version: ${{ env.PNPM_VERSION }}
31+
32+
- uses: actions/setup-node@v3.5.1
33+
with:
34+
cache: pnpm
35+
node-version-file: package.json
36+
37+
- name: Install node modules
38+
run: pnpm install
39+
40+
- name: Lint
41+
run: |
42+
pnpm lint:hbs
43+
pnpm lint:js
44+
pnpm lint:deps
45+
46+
- name: Run percy exec
47+
if: github.repository == 'rust-lang/crates.io'
48+
run: pnpm percy exec -- pnpm test-coverage
49+
50+
- name: test-coverage
51+
if: github.repository != 'rust-lang/crates.io'
52+
run: pnpm test-coverage

0 commit comments

Comments
 (0)