Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade docker action, yew and actix sqlx #26

Merged
merged 15 commits into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 25 additions & 18 deletions .github/workflows/backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,38 @@ on:
paths:
- 'actix-api/**'
- 'types/**'
- Dockerfile.actix
- 'yew-ui/**'
- 'docker/**'

name: check backend

env:
ACTIX_PORT: 8080
TRUNK_SERVE_PORT: 80
TRUNK_SERVE_HOST: localhost
OAUTH_CLIENT_ID: OAUTH_CLIENT_ID
OAUTH_AUTH_URL: OAUTH_AUTH_URL
OAUTH_TOKEN_URL: OAUTH_TOKEN_URL
OAUTH_CLIENT_SECRET: OAUTH_CLIENT_SECRET
OAUTH_REDIRECT_URL: http://localhost:${ACTIX_PORT:-8080}/login/callback
RUST_LOG: info
PG_URL: postgres://postgres:docker@postgres:5432/actix-api-db?sslmode=disable

jobs:
test:
name: cargo test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/[email protected]

# Cache Docker layers
- name: Cache Docker layers
uses: actions/cache@v2
with:
components: clippy, rustfmt
- run: cd actix-api && cargo clippy -- --deny warnings
- run: cd actix-api && cargo fmt --check
- run: cd actix-api && cargo test
path: /tmp/.docker
key: ${{ runner.os }}-docker-${{ github.sha }}
restore-keys: |
${{ runner.os }}-docker-

# Cache Rust build artifacts
- name: Cache Cargo Registry
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-

- run: make check
- run: make test
32 changes: 0 additions & 32 deletions .github/workflows/frontend.yaml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.mov
.mp4
.env
target
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ clippy-fix:

check:
# The ui does not support clippy yet
docker compose -f docker/docker-compose.yaml run yew-ui bash -c "cd app/yew-ui && cargo clippy --all -- --deny warnings && cargo fmt --check"
#docker compose -f docker/docker-compose.yaml run yew-ui bash -c "cd app/yew-ui && cargo clippy --all -- --deny warnings && cargo fmt --check"
docker compose -f docker/docker-compose.yaml run actix-api bash -c "cd app/actix-api && cargo clippy --all -- --deny warnings && cargo fmt --check"
Loading
Loading