Skip to content

Commit

Permalink
refactor(ci): simplify ci and align with other projects standards
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-hagemann committed Aug 15, 2024
1 parent 0076fe1 commit 69fd697
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 58 deletions.
42 changes: 0 additions & 42 deletions .github/workflows/build-and-test.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,34 +1,58 @@
name: Check, build and publish
name: CI

on:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
pull_request:
branches:
- main

workflow_dispatch:

jobs:
checks:
name: Test and lint
runs-on: ubuntu-22.04
permissions:
checks: write
build:
name: Build Ratings
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable

- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y libssl-dev pkg-config protobuf-compiler libprotobuf-dev
sudo apt-get install -y libssl-dev pkg-config protobuf-compiler
- name: Checkout code
uses: actions/checkout@v4
- name: Check code formating
uses: mbrobbel/rustfmt-check@master
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Clippy linting
uses: giraffate/clippy-action@v1
with:
reporter: "github-pr-review"
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Dependencies security audit
uses: actions-rust-lang/audit@v1
with:
ignore: RUSTSEC-2023-0071 # patch not available att

- name: Test and lint code
uses: ./.github/workflows/build-and-test.yaml
- name: Setup and Run Tests
run: |
cargo install cargo-make
cargo install dotenvy --features=cli
cargo make full-test
publish:
if: github.event_name == 'push'
name: Publish to ghcr.io
needs: build
runs-on: ubuntu-22.04
permissions:
contents: read
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ concurrency:
cancel-in-progress: true

jobs:
build:
uses: ./.github/workflows/build-and-test.yaml
cla:
uses: ./.github/workflows/cla.yaml
style-lints:
Expand Down

0 comments on commit 69fd697

Please sign in to comment.