chore(deps): update npm dependencies #456
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: | |
workflow_dispatch: | |
env: | |
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse | |
SQLX_OFFLINE: true | |
jobs: | |
prettier: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: 'npm' | |
- run: npm ci | |
- run: npx prettier --check . | |
eslint: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: 'npm' | |
- run: npm ci | |
- run: npx eslint . | |
tsc: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: 'npm' | |
- run: npm ci | |
- run: npx --workspaces tsc | |
fmt_check: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
- run: npm run fmt | |
udeps: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install prerequisites | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev protobuf-compiler | |
rustup set auto-self-update disable | |
rustup default nightly | |
mkdir dist | |
- uses: taiki-e/install-action@cargo-udeps | |
- run: cargo udeps | |
- run: cargo udeps --all-features | |
clippy_check: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install prerequisites | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev protobuf-compiler | |
rustup set auto-self-update disable | |
rustup toolchain install stable --profile minimal --component clippy | |
mkdir dist | |
- run: npm run clippy | |
test_rust: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
services: | |
postgres: | |
image: postgres:16 | |
env: | |
POSTGRES_DB: spaced | |
POSTGRES_USER: admin | |
POSTGRES_PASSWORD: password | |
ports: | |
- 5432:5432 | |
rabbitmq: | |
image: rabbitmq | |
env: | |
RABBITMQ_DEFAULT_USER: admin | |
RABBITMQ_DEFAULT_PASS: password | |
ports: | |
- 5672:5672 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install prerequisites | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev protobuf-compiler | |
rustup set auto-self-update disable | |
rustup toolchain install stable --profile minimal --component clippy | |
mkdir dist | |
- run: cargo test | |
env: | |
DATABASE_URL: postgres://admin:password@localhost:5432/spaced | |
SQLX_OFFLINE: true | |
build_docker: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/bake-action@v5 | |
- run: docker images | |
- run: docker save $(docker images --filter "reference=spaced/*" --format "{{.Repository}}:{{.Tag}}") -o images.tar | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: docker images | |
path: images.tar | |
e2e: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
needs: build_docker | |
env: | |
SQLX_OFFLINE: false | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: docker images | |
path: . | |
- run: docker load -i images.tar | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- run: npm ci | |
- run: npm run build | |
- run: docker compose --profile services up -d | |
- run: npx playwright install --with-deps | |
- run: npm run e2e | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-report | |
path: srcs/e2e/playwright-report/ | |
retention-days: 30 |