Skip to content

Commit

Permalink
upgrade docker action, yew and actix sqlx (#26)
Browse files Browse the repository at this point in the history
* save

* sqlx

* fix all async functions

* direct thread

* save

* base image

* add checker and tester

* save images

* remove env

* comment makefile

* gitignore

* clippy

* fmt

* bump yew

* save images removed
  • Loading branch information
darioalessandro authored Nov 24, 2023
1 parent 747e4eb commit 3057f41
Show file tree
Hide file tree
Showing 14 changed files with 1,589 additions and 392 deletions.
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

0 comments on commit 3057f41

Please sign in to comment.