-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
131 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "cargo" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
- package-ecosystem: "docker" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Build and Publish Docker image | ||
|
||
on: | ||
push: | ||
branches: ['main'] | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
push_to_registry: | ||
name: Push Docker image to ghcr registry | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: read | ||
|
||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Log in to the Github Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@a64d0487d7069df33b279515d35d60fa80e2ea62 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
tags: | | ||
type=ref,event=branch,suffix=_{{sha}} | ||
type=raw,value=latest,enable={{is_default_branch}} | ||
- name: Build and push Docker images | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
on: [push, pull_request] | ||
|
||
name: Code coverage with grcov | ||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
|
||
jobs: | ||
grcov: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- macOS-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
override: true | ||
profile: minimal | ||
|
||
- name: Clean previous build artifacts | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: clean | ||
|
||
- name: Execute tests | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --all-features --no-fail-fast | ||
env: | ||
CARGO_INCREMENTAL: 0 | ||
RUSTFLAGS: >- | ||
-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code | ||
-Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests | ||
RUSTDOCFLAGS: >- | ||
-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code | ||
-Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests | ||
- name: Gather coverage data | ||
uses: actions-rs/[email protected] | ||
with: | ||
config: ./grcov.yml | ||
|
||
- name: Coveralls upload | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
path-to-lcov: ./lcov.info | ||
flag-name: run-${{ matrix.os }} | ||
parallel: true | ||
|
||
grcov_finalize: | ||
needs: grcov | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Coveralls finalization | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
parallel-finished: true |