Skip to content

Commit

Permalink
feat: ci-cd and coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
0xBradock committed Feb 10, 2024
1 parent c4a1f16 commit ba405a3
Show file tree
Hide file tree
Showing 4 changed files with 304 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/ci-cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build

on:
push:
branches:
- master
pull_request:
types: [ opened, synchronize, reopened ]
branches:
- master

jobs:
test:
name: Test
runs-on: ubuntu-latest
services:
steps:
- name: Check out repository code
uses: actions/checkout@v4

- name: Install the Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Run tests
run: cargo llvm-cov --codecov

- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
env:
token: ${{ secrets.CODECOV_TOKEN }}
slug: 0xBradock/actix-real-world

fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Enforce formatting
run: cargo fmt --check

clippy:
name: Clippy
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: postgres
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
Loading

0 comments on commit ba405a3

Please sign in to comment.