-
Notifications
You must be signed in to change notification settings - Fork 2
92 lines (82 loc) · 2.53 KB
/
bundler-code.yml
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Bundler Code
on:
push:
pull_request:
jobs:
lint:
# Deduplicate jobs from pull requests and branch pushes within the same repo.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
services:
ispyb:
image: ghcr.io/diamondlightsource/ispyb-database:v3.0.0
ports:
- 3306:3306
env:
MARIADB_ROOT_PASSWORD: rootpassword
options: >
--health-cmd "/usr/local/bin/healthcheck.sh --defaults-file=/ispyb/.my.cnf --connect"
env:
DATABASE_URL: mysql://root:rootpassword@localhost/ispyb_build
steps:
- name: Checkout source
uses: actions/[email protected]
- name: Install stable toolchain
uses: actions-rs/[email protected]
with:
toolchain: stable
default: true
- name: Cache Rust Build
uses: Swatinem/[email protected]
- name: Check Formatting
uses: actions-rs/[email protected]
with:
command: fmt
args: >
--manifest-path bundler/Cargo.toml
--all
--check
- name: Lint with Clippy
uses: actions-rs/[email protected]
with:
command: clippy
args: >
--manifest-path bundler/Cargo.toml
--all-targets
--all-features
--no-deps
--
--deny warnings
test:
# Deduplicate jobs from pull requests and branch pushes within the same repo.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
services:
ispyb:
image: ghcr.io/diamondlightsource/ispyb-database:v3.0.0
ports:
- 3306:3306
env:
MARIADB_ROOT_PASSWORD: rootpassword
options: >
--health-cmd "/usr/local/bin/healthcheck.sh --defaults-file=/ispyb/.my.cnf --connect"
env:
DATABASE_URL: mysql://root:rootpassword@localhost/ispyb_build
steps:
- name: Checkout source
uses: actions/[email protected]
- name: Install stable toolchain
uses: actions-rs/[email protected]
with:
toolchain: stable
default: true
- name: Cache Rust Build
uses: Swatinem/[email protected]
- name: Test
uses: actions-rs/[email protected]
with:
command: test
args: >
--manifest-path bundler/Cargo.toml
--all-targets
--all-features