diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..aa07a02 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,21 @@ +on: + pull_request: + push: + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + rust-version: ["stable", "beta", "nightly", "1.70"] + + steps: + - uses: actions/checkout@v4 + - run: rustup toolchain install ${{ matrix.rust-version }} + - run: cargo +${{ matrix.rust-version }} test --all + + test-fmt: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: cargo fmt --check --all diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index c3c1703..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,55 +0,0 @@ -stages: - - test - - -.setup_template: &setup_template - stage: test - image: debian:stable-slim - before_script: - - export CARGO_HOME="$CI_PROJECT_DIR/.cargo" - - export PATH="$PATH:$CARGO_HOME/bin" - - export RUST_BACKTRACE=full - - apt-get update > /dev/null - - apt-get install -y curl build-essential > /dev/null - - curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUST_VERSION - - rustup --version - - rustc --version - - cargo --version - -.test_all_template: &test_all_template - <<: *setup_template - script: - - cargo test --all - - -test-stable: - <<: *setup_template - script: - - cargo test --all || bash ./ci/try_to_recover.sh - variables: - RUST_VERSION: stable - -test-beta: - <<: *test_all_template - variables: - RUST_VERSION: beta - -test-nightly: - <<: *test_all_template - variables: - RUST_VERSION: nightly - - -test-1.31.0: - <<: *setup_template - script: - - cargo test --tests # skip doctests - variables: - RUST_VERSION: 1.31.0 - -test-fmt: - <<: *setup_template - script: - - cargo fmt --all -- --check - variables: - RUST_VERSION: stable diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 362003f..0000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: rust -rust: - - stable - - beta - - nightly -script: - - cargo test --all -matrix: - include: - - rust: 1.31.0 - script: cargo test --tests # skip doctests - allow_failures: - - rust: nightly - fast_finish: true - - -notifications: - email: - on_success: never diff --git a/README.md b/README.md index 7fbe07c..312ff42 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ # Makes error reporting in procedural macros nice and easy -[![travis ci](https://travis-ci.org/CreepySkeleton/proc-macro-error.svg?branch=master)](https://travis-ci.org/CreepySkeleton/proc-macro-error) [![docs.rs](https://docs.rs/proc-macro-error/badge.svg)](https://docs.rs/proc-macro-error) [![unsafe forbidden](https://img.shields.io/badge/unsafe-forbidden-success.svg)](https://github.com/rust-secure-code/safety-dance/) diff --git a/ci/try_to_recover.sh b/ci/try_to_recover.sh deleted file mode 100644 index d94fabc..0000000 --- a/ci/try_to_recover.sh +++ /dev/null @@ -1,24 +0,0 @@ -set -e - -apt-get install -y git - -echo "BRANCH: $CI_COMMIT_BRANCH" - -[[ "$CI_COMMIT_BRANCH" != master ]] && exit 1 - -echo "Trying to adjust .stderr files..." - -export TRYBUILD=overwrite -if cargo test --all ; then - echo "Adjustment succeeded" - - git config user.name "${GITLAB_USER_NAME}" - git config user.email "${GITLAB_USER_EMAIL}" - git add ./tests/ui/*.stderr - git commit -m "Adjust .stderr files" - git push "http://${GITLAB_USER_NAME}:${GITLAB_PERSONAL_ACCESS_TOKEN}@gitlab.com/CreepySkeleton/proc-macro-error" HEAD:master - exit 0 -else - echo "Adjustment failed" - exit 1 -fi