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

Better API key support #98

Merged
merged 10 commits into from
Jun 3, 2024
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
96 changes: 9 additions & 87 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,21 @@ env:
REGISTRY: ghcr.io

jobs:
rustfmt:
name: rustfmt
strategy:
matrix:
rust: ["stable"]
lint:
name: Lint and test
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
components: rustfmt
override: true
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: Swatinem/rust-cache@v2
- run: cargo check --all-targets --all-features
- run: cargo test --verbose -- --nocapture

docker-build-and-push:
name: Docker build
runs-on: ubuntu-latest
needs: lint
permissions:
contents: read
packages: write
Expand All @@ -58,72 +49,3 @@ jobs:
with:
push: true
tags: ghcr.io/${{ github.repository_owner }}/graphix:latest

build:
name: Build
strategy:
fail-fast: false
matrix:
rust: ["stable"]
runs-on: ubuntu-latest

steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Cache cargo registry
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: test-cargo-${{ hashFiles('**/Cargo.toml') }}
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Build
uses: actions-rs/cargo@v1
with:
command: build

test:
name: Test
strategy:
fail-fast: false
matrix:
rust: ["stable"]
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: graphix_test
ports:
- 5432:5432
env:
GRAPHIX_TEST_DB_URL: "postgresql://postgres:postgres@localhost:5432/graphix_test"

steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Cache cargo registry
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: test-cargo-${{ hashFiles('**/Cargo.toml') }}
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose -- --nocapture
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ rustc-ice*

### Project specific
ops/compose/data/*
/frontend/dist
frontend/graphql/api_schema.graphql
ops/compose/grafana/*
!ops/compose/grafana/data/grafana.db
Loading
Loading