diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..cc470c2 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,33 @@ +name: Test CIRC + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Install Rust nightly toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + components: rustfmt, clippy + + - name: Install cargo-audit + run: cargo install cargo-audit + + - name: Run checks + run: | + cargo check --verbose + cargo fmt -- --check + cargo clippy -- -D warnings + cargo audit + + - name: Run tests + run: | + cargo test + cargo test --release diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index a8f0bf4..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,49 +0,0 @@ -# Setup a cache to cache job parts between jobs to ensure faster builds -cache: - key: "$CI_JOB_NAME" - untracked: true - paths: - - $HOME/.cargo/ - - target/ - -# Set any required environment variables here -variables: - RUST_BACKTRACE: "FULL" - GIT_SUBMODULE_STRATEGY: recursive - -image: rust:latest - -stages: - - install - - test - - deploy - -install: - stage: install - script: - # Trigger installation - - rustc --version - -check: - stage: test - before_script: - - rustup component add rustfmt clippy - - cargo install cargo-audit - script: - - cargo check --verbose - - cargo fmt -- --check - - cargo clippy -- -D warnings - - cargo audit - - cargo test - - cargo test --release - -pages: - stage: deploy - script: - - cargo doc --no-deps - - mkdir -p public && cp -r target/doc/* public - artifacts: - paths: - - public - rules: - - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH