-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (47 loc) · 1.16 KB
/
rust.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
name: Rust
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
env:
CARGO_TERM_COLOR: always
WEIGHTS: "weights.txt"
BIND_URL: "127.0.0.1:3000"
DATA: "data.txt"
LEARNING_RATE: "0.1"
BATCH_SIZE: "128"
TRAIN_ITER: "3000"
TEST_ITER: "500"
OUTPUT_LEVEL: "1"
RUST_BACKTRACE: "1"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Build
run: cargo build --verbose
- name: Run api tests
run: cargo test --verbose --lib api
- name: Run model tests
run: cargo test --verbose --lib model
- name: Run site tests
run: cargo test --verbose --lib site
images:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Build Docker images
run: docker-compose build
- name: Push Docker images
run: |
echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
docker-compose push