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

refactor: serverful #1

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open
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
11 changes: 11 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.github
.vscode
migrations
target
.dockerignore
.env*
.gitignore
.rustfmt.toml
docker-compose.yml
Dockerfile
Makefile.toml
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FRONTEND_URl="http://localhost:3000"
DATABASE_URL="postgres://admin:securepassword@localhost:5432/benchmarks"
PORT=47143
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Format, Lint, and Build

on:
push:
branches: [main]
paths-ignore: ["**.md"]
pull_request:
paths-ignore: ["**.md"]

env:
CARGO_TERM_COLOR: always

jobs:
suite:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Register Problem Matchers
uses: r7kamura/rust-problem-matchers@v1

- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt,clippy

- name: Rust Cache
uses: Swatinem/rust-cache@v2

- name: Install Cargo Make
uses: davidB/rust-cargo-make@v1

- name: Run Formatter
run: cargo +nightly fmt --all -- --check

- name: Run Clippy
run: cargo +nightly clippy --tests --examples --all-targets --all-features --workspace -- -D warnings

- name: Build
run: cargo build --release
18 changes: 0 additions & 18 deletions .github/workflows/deploy.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Deploy Docker Image

on:
# push:
# branches: [main]
push:
branches: [main]
workflow_dispatch:

env:
Expand Down Expand Up @@ -32,7 +32,7 @@ jobs:
restore-keys: |
${{ runner.os }}-buildx-

- name: Login to Google Container Registry
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
Expand Down
7 changes: 2 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
.wrangler
build
node_modules
target
.dev.vars
dist
.env*
!.env.example
35 changes: 35 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-toml
- id: check-yaml
- id: pretty-format-json
args: ["--indent=4", "--autofix", "--no-sort-keys"]
# - id: check-added-large-files

- repo: local
hooks:
- id: format
name: format
description: Format files with rustfmt.
entry: makers fmt
language: system
types: [rust]
pass_filenames: false
- id: lint
name: lint
description: Lint files with Clippy.
entry: makers lint
language: system
types: [rust]
pass_filenames: false
- id: check
name: check
description: Check files with Cargo Check
entry: cargo check
language: system
types: [rust]
pass_filenames: false

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading