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(ci): simplify ci and align with other projects standards #117

Merged
merged 1 commit into from
Aug 15, 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
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
Loading