diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..fd4bed2 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,24 @@ +# Copyright (C) Nitrokey GmbH +# SPDX-License-Identifier: CC0-1.0 + +name: CI + +on: + pull_request: + push: + branches: [main] + workflow_dispatch: + + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@master + - name: Install rust + run: rustup show active-toolchain || rustup toolchain install + - name: Run checks + run: make lint + - name: Run tests + run: make test TEST_FEATURES="rsa,virt" diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index c9aee8a..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,47 +0,0 @@ -include: 'https://raw.githubusercontent.com/Nitrokey/common-ci-jobs/master/common_jobs.yml' - -stages: - - pull-github - - build - - deploy - -variables: - GIT_STRATEGY: clone - GIT_DEPTH: 0 - GIT_SUBMODULE_STRATEGY: recursive - REPO_NAME: piv-authenticator - MAIN_BRANCH: initial-refacto - COMMON_PULL: "true" - COMMON_UPLOAD_NIGHTLY: "false" - COMMON_GITHUB_RELEASE: "false" - COMMON_UPLOAD_FILES: "false" - -build: - image: registry.git.nitrokey.com/nitrokey/piv-authenticator/piv-authenticator-build:latest - rules: - - if: '$CI_PIPELINE_SHOULD_NOT_BUILD == "true"' - when: never - - if: '$CI_PIPELINE_SOURCE == "push"' - - if: '$CI_PIPELINE_SOURCE == "web"' - - if: '$CI_PIPELINE_SOURCE == "schedule"' - tags: - - docker - stage: build - before_script: - - cargo --version - script: - - make ci - after_script: - - wget $icon_server/checkmark/$CI_COMMIT_REF_NAME/$CI_COMMIT_SHA/$CI_JOB_NAME/$CI_JOB_STATUS/${CI_JOB_URL#*/*/*/} - - cp /app/.cache/scdaemon.log scdaemon.log - coverage: '/^\d+.\d+% coverage/' - artifacts: - when: always - paths: - - "scdaemon.log" - - "cobertura.xml" - - "tarpaulin-report.html" - reports: - coverage_report: - coverage_format: cobertura - path: cobertura.xml diff --git a/Makefile b/Makefile index ff384b2..2ee55fd 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ lint: cargo fmt --check cargo check --all-features --all-targets cargo clippy --all-targets --all-features -- -Dwarnings - RUSTDOCFLAGS='-Dwarnings' cargo doc --all-features + RUSTDOCFLAGS='-Dwarnings' cargo doc --all-features --no-deps .PHONY: tarpaulin tarpaulin: