use a status var instead of calling func #67
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | |
- uses: actions/checkout@v3 | |
- name: Build | |
run: cargo build --verbose | |
- name: Run tests | |
run: cargo test --verbose | |
images: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- 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 |