Skip to content

Implementation of the NSS client in Rust #190

Implementation of the NSS client in Rust

Implementation of the NSS client in Rust #190

Workflow file for this run

name: QA & sanity checks
on:
push:
branches:
- main
tags:
- "*"
pull_request:
env:
apt_deps: >-
libpam0g-dev
jobs:
go-sanity:
name: "Go: Code sanity"
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo DEBIAN_FRONTEND=noninteractive apt update
sudo DEBIAN_FRONTEND=noninteractive apt install -y ${{ env.apt_deps }}
- uses: actions/checkout@v3
- name: Go code sanity check
uses: canonical/desktop-engineering/gh-actions/go/code-sanity@main
with:
golangci-lint-configfile: ".golangci.yaml"
tools-directory: "tools"
rust-sanity:
name: "Rust: Code sanity"
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo DEBIAN_FRONTEND=noninteractive apt update
sudo DEBIAN_FRONTEND=noninteractive apt install -y ${{ env.apt_deps }} protobuf-compiler protobuf-compiler-grpc
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
- name: Build crate
uses: actions-rs/cargo@v1
with:
command: build
args: --all-features
- name: Check code format with rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
- name: Check code format with clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
go-tests:
name: "Go: Tests"
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo DEBIAN_FRONTEND=noninteractive apt update
sudo DEBIAN_FRONTEND=noninteractive apt install -y ${{ env.apt_deps }}
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Run tests
run: |
set -eu
go test -coverpkg=./... -coverprofile=/tmp/coverage.out -covermode=set ./... -shuffle=on
- name: Run tests (with race detector)
run: |
go test -race ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: /tmp/coverage.combined
# TODO: rust-tests: