-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (44 loc) · 1.46 KB
/
cargo-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
on: [push]
name: SQLServer NDC tests
jobs:
build_and_test:
name: Test SQLServer NDC
runs-on: ubuntu-latest
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
RUSTFLAGS: "-D warnings" # fail on warnings
steps:
- uses: actions/checkout@v4
- name: install protoc
uses: arduino/setup-protoc@v2
with:
version: "23.3"
- name: install tools
run: |
rustup show
- uses: Swatinem/rust-cache@v2
- uses: isbang/[email protected]
with:
compose-file: "./docker-compose.yaml"
down-flags: "--volumes"
services: |
sqlserver
- name: Load Chinook data
run: sqlcmd -S localhost,64003 -U SA -P "Password!" -i "./static/chinook-sqlserver.sql"
- name: run tests
run: |
cargo test --release --workspace
env:
POSTGRESQL_CONNECTION_STRING: sqlserverql://sqlserver:password@localhost:64002
RUST_LOG: INFO
# scream into Slack if something goes wrong
- name: Report Status
if: github.ref == 'refs/heads/main'
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notify_when: failure
notification_title: '😧 Error on <{repo_url}|{repo}>'
message_format: '🐴 *{workflow}* {status_message} for <{repo_url}|{repo}>'
env:
SLACK_WEBHOOK_URL: ${{ secrets.BROKEN_BUILD_SLACK_WEBHOOK_URL }}