Skip to content

Instantly share code, notes, and snippets.

@LukeMathWalker
Last active December 9, 2024 18:12
Show Gist options
  • Save LukeMathWalker/d98fa8d0fc5394b347adf734ef0e85ec to your computer and use it in GitHub Desktop.
Save LukeMathWalker/d98fa8d0fc5394b347adf734ef0e85ec to your computer and use it in GitHub Desktop.

Revisions

  1. LukeMathWalker revised this gist Feb 6, 2021. 1 changed file with 27 additions and 6 deletions.
    33 changes: 27 additions & 6 deletions .gitlab-ci.yml
    Original file line number Diff line number Diff line change
    @@ -1,13 +1,34 @@
    image: rust
    image: "rust:latest"

    test:
    script:
    - rustc --version
    default:
    before_script:
    - rustc --version
    - cargo --version

    stages:
    - test

    test-code:
    stage: test
    script:
    - cargo test
    - rustup component add rustfmt
    - cargo fmt -- --check
    - cargo install cargo-tarpaulin
    - cargo tarpaulin --ignore-tests

    lint-code:
    stage: test
    script:
    - rustup component add clippy
    - cargo clippy -- -D warnings

    format-code:
    stage: test
    script:
    - rustup component add rustfmt
    - cargo fmt -- --check

    audit-code:
    stage: test
    script:
    - cargo install cargo-audit
    - cargo audit
  2. LukeMathWalker created this gist Jun 7, 2020.
    13 changes: 13 additions & 0 deletions .gitlab-ci.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    image: rust

    test:
    script:
    - rustc --version
    - cargo --version
    - cargo test
    - rustup component add rustfmt
    - cargo fmt -- --check
    - rustup component add clippy
    - cargo clippy -- -D warnings
    - cargo install cargo-audit
    - cargo audit