chore: remove secret key file #90
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
clippy_check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Ready env file | |
run: sh ./scripts/copy-env.sh | |
- name: Install Clippy | |
run: rustup component add clippy | |
- name: Run clippy-check for github comment | |
uses: actions-rs/clippy-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --all-features | |
test_unit: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v2 | |
- name: Ready env file | |
run: sh ./scripts/copy-env.sh | |
- name: Build | |
run: cargo build --verbose | |
- name: Run tests | |
run: cargo test --verbose | |
test_e2e: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:latest | |
env: | |
POSTGRES_DB: realworld-rust-actix-web | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
ports: | |
- 5432:5432 | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v2 | |
- name: Ready env file | |
run: sh ./scripts/copy-env.sh | |
- name: Build | |
run: cargo build --verbose | |
- name: Install diesel CLI | |
run: cargo install diesel_cli | |
- name: Run server on background | |
run: | | |
cargo run & | |
echo "waiting for server..." | |
./scripts/wait-for-it.sh 0.0.0.0:8080 --timeout=300 --strict -- echo "Waked up container" | |
echo "setup diesel..." | |
diesel setup | |
echo "check health check..." | |
curl http://0.0.0.0:8080/api/healthcheck \ | |
--max-time 60 \ | |
--verbose \ | |
--retry 5 \ | |
--retry-delay 0 \ | |
--retry-connrefused | |
echo "running e2e..." | |
APIURL=http://localhost:8080/api sh ./e2e/run-api-tests.sh | |
# - name: Wait for waking server | |
# run: ./wait-for-it.sh localhost:8080 --timeout=300 --strict -- echo "Waked up container" | |
# - name: Health check | |
# run: | |
# - name: Ready for npx | |
# uses: actions/setup-node@v2 | |
# with: | |
# node-version: "14" | |
# - name: Run e2e test | |
# run: APIURL=http://localhost:8080/api sh ./e2e/run-api-tests.sh |