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

Update various aspects of CI #34

Merged
merged 6 commits into from
Jan 16, 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
64 changes: 38 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
on: [push, pull_request]

name: CI
on:
push:
branches-ignore:
- "gh-readonly-queue/**"
pull_request:
merge_group:

env:
REGISTRY: ghcr.io
Expand All @@ -12,51 +16,57 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions-rs/cargo@v1
with:
command: check
args: --all-features
- uses: dtolnay/[email protected]
- run: cargo check --all-targets --all-features

fmt:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions-rs/cargo@v1
- uses: dtolnay/[email protected]
with:
command: fmt
args: --all --check
components: rustfmt
- run: cargo fmt --all --check

test:
name: cargo test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions-rs/cargo@v1
with:
command: test
- uses: dtolnay/[email protected]
- run: cargo test --all-targets --all-features

clippy:
name: cargo clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@1.70
with:
toolchain: stable
- uses: actions-rs/cargo@v1
components: clippy
- run: cargo clippy --all-targets --all-features -- -D warnings

clippy-latest:
name: cargo clippy latest
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- run: cargo clippy --all-targets --all-features -- -D warnings

minimal-dependencies:
name: minimal direct dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@nightly
with:
command: clippy
args: -- -D warnings
components: clippy
- run: cargo check -Z direct-minimal-versions

docker-image:
name: Docker image build
Expand All @@ -83,6 +93,7 @@ jobs:

- name: Build and push Docker image
uses: docker/build-push-action@v5
if: github.event_name != 'pull_request'
with:
context: .
push: true
Expand All @@ -99,6 +110,7 @@ jobs:
- test
- clippy
- docker-image
- minimal-dependencies
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
Expand Down
16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ homepage = "https://gitlab.collabora.com/lava/lava-gitlab-runner"
repository = "https://gitlab.collabora.com/lava/lava-gitlab-runner.git"

[dependencies]
bytes = "1.2.0"
chrono = { version = "0.4", features = ["serde"] }
bytes = "1.2.1"
chrono = { version = "0.4.20", features = ["serde"] }
colored = "2"
gitlab-runner = "0.0.8"
lava-api = "0.1.1"
lava-api = "0.1.2"
lazy_static = "1.4"
structopt = "0.3.23"
url = "2.2.2"
tokio = "1.12.0"
tokio = "1.35"
async-trait = "0.1.51"
futures = "0.3.17"
handlebars = "4"
handlebars = "5"
masker = { version="0.0.4", features=["streams"] }
junit-parser = "0.2"
serde = { version = "^1.0.97", features = ["derive"] }
junit-parser = "1"
serde = { version = "^1.0.194", features = ["derive"] }
serde_json = "1.0.68"
serde_yaml = "0.9"
serde_yaml = "0.9.30"
rand = "0.8.4"
tempfile = "3.3.0"
tokio-util = { version = "0.7", features = [ "io" ] }
Expand Down
Loading