Check if an email address exists without sending any email, written in Rust. Comes with a ⚙️ HTTP backend.
Rust emailemail-validationemail-validation-apiemail-verificationemail-verification-apiemail-verifierhacktoberfest
chore: Remove travis CI (#212)
Amaury Martiny5c2f18db86b6
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.ymlnew file mode 100644index 00000000..e2d43358--- /dev/null+++ b/.github/workflows/deploy.yml@@ -0,0 +1,111 @@+# Based on https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md++on:+ push:+ # Sequence of patterns matched against refs/tags+ tags:+ - v*++name: deploy++env:+ BIN_NAME: check_if_email_exists+ CRATE_NAME: check-if-email-exists++jobs:+ # Create on Github Release first, then upload all the artifacts+ release:+ runs-on: ubuntu-latest++ steps:+ # Get the tag name+ # https://github.com/olegtarasov/get-tag+ - uses: olegtarasov/get-tag@v2+ id: tag_name++ - name: Create Release+ id: create_release+ uses: actions/[email protected]+ env:+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}+ with:+ tag_name: ${{ steps.tag_name.outputs.tag }}+ release_name: Release ${{steps.tag_name.outputs.tag }}++ - name: Output Release URL File+ run: echo "${{ steps.create_release.outputs.upload_url }}" > release_url.txt++ - name: Save Release URL File for upload job+ uses: actions/upload-artifact@v1+ with:+ name: release_url+ path: release_url.txt++ upload:+ needs: release+ runs-on: ${{ matrix.os }}+ strategy:+ matrix:+ os: [ubuntu-latest, macOS-latest]+ include:+ - os: ubuntu-latest+ target: x86_64-unknown-linux-gnu+ - os: macOS-latest+ target: x86_64-apple-darwin++ env:+ OS: ${{ matrix.os }}+ TARGET: ${{ matrix.target }}++ steps:+ - uses: hecrj/setup-rust-action@v1++ - name: Checkout sources+ uses: actions/checkout@v1++ - name: Build+ run: cargo build --release --target $TARGET++ # Cache cargo+ # https://github.com/actions/cache/blob/master/examples.md#rust---cargo+ - name: Cache cargo registry+ uses: actions/cache@v1+ with:+ path: ~/.cargo/registry+ key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}+ - name: Cache cargo index+ uses: actions/cache@v1+ with:+ path: ~/.cargo/git+ key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}+ - name: Cache cargo build+ uses: actions/cache@v1+ with:+ path: target+ key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}++ # Get the tag name+ # https://github.com/olegtarasov/get-tag+ - uses: olegtarasov/get-tag@v2+ id: tag_name++ - name: Package+ run: tar czf $CRATE_NAME-$GIT_TAG_NAME-$TARGET.tar.gz target/$TARGET/release/$BIN_NAME++ - name: Get Release File Name & Upload URL+ id: get_release_info+ run: |+ echo ::set-output name=file_name::$CRATE_NAME-$GIT_TAG_NAME+ value=`cat release_url/release_url.txt`+ echo ::set-output name=upload_url::$value++ - name: Upload Release Asset+ id: upload-release-asset+ uses: actions/[email protected]+ env:+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}+ with:+ upload_url: ${{ steps.get_release_info.outputs.upload_url }}+ asset_path: $CRATE_NAME-$GIT_TAG_NAME-$TARGET.tar.gz+ asset_name: $CRATE_NAME-$GIT_TAG_NAME-$TARGET.tar.gz+ asset_content_type: application/gzipdiff --git a/.github/workflows/pr.yml b/.github/workflows/pr.ymlindex 04de618e..f648d781 100644--- a/.github/workflows/pr.yml+++ b/.github/workflows/pr.yml@@ -2,11 +2,10 @@on: [pull_request]-name: CI+name: prjobs:check:- name: Checkruns-on: ubuntu-lateststeps:- name: Checkout sources@@ -25,7 +24,6 @@ jobs:command: checktest:- name: Test Suiteruns-on: ubuntu-lateststeps:- name: Checkout sources@@ -45,7 +43,6 @@ jobs:args: --alle2e:- name: E2E Testruns-on: ${{ matrix.os }}strategy:matrix:@@ -61,7 +58,6 @@ jobs:run: cargo run -- [email protected] | grep "is_deliverable" # If `is_deliverable` shows up, it means that the SMTP checks happenedlints:- name: Lintsruns-on: ubuntu-lateststeps:- name: Checkout sourcesdiff --git a/.travis.yml b/.travis.ymldeleted file mode 100644index 2c04f05e..00000000--- a/.travis.yml+++ /dev/null@@ -1,131 +0,0 @@-# Based on the "trust" template v0.1.2-# https://github.com/japaric/trust/tree/v0.1.2--dist: trusty-language: rust-services: docker-sudo: required--# TODO Rust builds on stable by default, this can be-# overridden on a case by case basis down below.--env:- global:- # TODO Update this to match the name of your project.- - CRATE_NAME=check-if-email-exists--matrix:- # TODO These are all the build jobs. Adjust as necessary. Comment out what you- # don't need- include:- # Android- # - env: TARGET=aarch64-linux-android DISABLE_TESTS=1- # - env: TARGET=arm-linux-androideabi DISABLE_TESTS=1- # - env: TARGET=armv7-linux-androideabi DISABLE_TESTS=1- # - env: TARGET=i686-linux-android DISABLE_TESTS=1- # - env: TARGET=x86_64-linux-android DISABLE_TESTS=1-- # iOS- # - env: TARGET=aarch64-apple-ios DISABLE_TESTS=1- # os: osx- # - env: TARGET=armv7-apple-ios DISABLE_TESTS=1- # os: osx- # - env: TARGET=armv7s-apple-ios DISABLE_TESTS=1- # os: osx- # - env: TARGET=i386-apple-ios DISABLE_TESTS=1- # os: osx- # - env: TARGET=x86_64-apple-ios DISABLE_TESTS=1- # os: osx-- # Linux- # - env: TARGET=aarch64-unknown-linux-gnu- # - env: TARGET=arm-unknown-linux-gnueabi- # - env: TARGET=armv7-unknown-linux-gnueabihf- # - env: TARGET=i686-unknown-linux-gnu- # - env: TARGET=i686-unknown-linux-musl- # - env: TARGET=mips-unknown-linux-gnu- # - env: TARGET=mips64-unknown-linux-gnuabi64- # - env: TARGET=mips64el-unknown-linux-gnuabi64- # - env: TARGET=mipsel-unknown-linux-gnu- # - env: TARGET=powerpc-unknown-linux-gnu- # - env: TARGET=powerpc64-unknown-linux-gnu- # - env: TARGET=powerpc64le-unknown-linux-gnu- # - env: TARGET=s390x-unknown-linux-gnu DISABLE_TESTS=1- - env: TARGET=x86_64-unknown-linux-gnu- - env: TARGET=x86_64-unknown-linux-musl-- # OSX- # - env: TARGET=i686-apple-darwin- # os: osx- - env: TARGET=x86_64-apple-darwin- os: osx-- # *BSD- # - env: TARGET=i686-unknown-freebsd DISABLE_TESTS=1- # - env: TARGET=x86_64-unknown-freebsd DISABLE_TESTS=1- # - env: TARGET=x86_64-unknown-netbsd DISABLE_TESTS=1- # Windows- # - env: TARGET=x86_64-pc-windows-gnu- # Bare metal- # These targets don't support std and as such are likely not suitable for- # most crates.- # - env: TARGET=thumbv6m-none-eabi- # - env: TARGET=thumbv7em-none-eabi- # - env: TARGET=thumbv7em-none-eabihf- # - env: TARGET=thumbv7m-none-eabi- # Testing other channels- # - env: TARGET=x86_64-unknown-linux-gnu- # rust: nightly- # - env: TARGET=x86_64-apple-darwin- # os: osx- # rust: nightly--before_install:- - set -e- - rustup self update--install:- - sh ci/install.sh- - source ~/.cargo/env || true--script:- - bash ci/script.sh--after_script: set +e--before_deploy:- - sh ci/before_deploy.sh--deploy:- # TODO update `api_key.secure`- # - Create a `public_repo` GitHub token. Go to: https://github.com/settings/tokens/new- # - Encrypt it: `travis encrypt 0123456789012345678901234567890123456789- # - Paste the output down here- api_key:- secure: UDYnqsGG4ded/yh4g7VBLeG2J3rWdXECvM1wFfjtSyJGNcfLijWDjJi+Iq5YFwmx1CLus93bUd1iZe4fvcS/chqWO0/5NPiXjJ85wN8CTC6JqGtDqVRFHkUJjgmWIq4nCVyILg62ASYblmSgLM8TGL++5waXYUpOs1eXhjZGD5/zHgvixBC5U5QmTOeA3/Z9CanKzw1P2oS2vtkXxGlFYcsOm9GgqIx2AaGL1ZhgutPc/2keDwySJ2rYBrUg8ql1+NT8fwoRayMLPegCtkrb/h4RwaytaF+d+8CcwRZORPzQDPPMrkOGa+KEtxNhr3o4c641Ya/6F8m7qeGqyrMaomxq0sOcNQyiDTj4Cy0trmoO0Bv8YCWxGVcwu4nrzrOGZV6Ty84n2rcjgr/iQ5L5WjfHBqFuSX/jhbCFVYyugC96Ya96yf474nYSvCmA8XWPStDUtt38F4dpAT50pwtCrDQMw6OO6eRa/zEiwQlGR6gEXpztK0zo/rmFzcE+laSLtGZwPeQJR6LqvX5qE/lOyVBEiFFExRztGxozfPKPJKV7TbKt4eX9bRvykMmAhQELiSWXiRd8uSO1jaARdQPsXWqve3hbv2A9yCnLdKw/aeJJLv9kQQpO3NsLkTrlo1He6FkUNN3jaUymsrZYtg80IMzTangJ7rn0PSHakH7Cc5o=- file_glob: true- file: $CRATE_NAME-$TRAVIS_TAG-$TARGET.*- on:- # TODO Here you can pick which targets will generate binary releases- # In this example, there are some targets that are tested using the stable- # and nightly channels. This condition makes sure there is only one release- # for such targets and that's generated using the stable channel- condition: $TRAVIS_RUST_VERSION = stable- tags: true- provider: releases- skip_cleanup: true--cache: cargo-before_cache:- # Travis can't cache files that are not readable by "others"- - chmod -R a+r $HOME/.cargo--branches:- only:- # release tags- - /^v\d+\.\d+\.\d+.*$/- - master--notifications:- email:-on_success: neverdiff --git a/appveyor.yml b/appveyor.ymlindex a9c98a6d..e79845a9 100644--- a/appveyor.yml+++ b/appveyor.yml@@ -8,6 +8,7 @@ environment:RUST_VERSION: stable# TODO Update this to match the name of your project.+ BIN_NAME: check_if_email_existsCRATE_NAME: check-if-email-exists# TODO These are all the build jobs. Adjust as necessary. Comment out what you@@ -29,10 +30,10 @@ environment:install:- ps: >-- If ($Env:TARGET -eq 'x86_64-pc-windows-gnu') {- $Env:PATH += ';C:\msys64\mingw64\bin'- } ElseIf ($Env:TARGET -eq 'i686-pc-windows-gnu') {- $Env:PATH += ';C:\msys64\mingw32\bin'+ If ($env:TARGET -eq 'x86_64-pc-windows-gnu') {+ $env:PATH += ';C:\msys64\mingw64\bin'+ } ElseIf ($env:TARGET -eq 'i686-pc-windows-gnu') {+ $env:PATH += ';C:\msys64\mingw32\bin'}- curl -sSf -o rustup-init.exe https://win.rustup.rs/- rustup-init.exe -y --default-host %TARGET% --default-toolchain %RUST_VERSION%@@ -53,7 +54,7 @@ test_script:before_deploy:# TODO Update this to build the artifacts that matter to you- - cargo rustc --target %TARGET% --release --bin check_if_email_exists -- -C lto+ - cargo rustc --target %TARGET% --release --bin %BIN_NAME% -- -C lto- ps: ci\before_deploy.ps1deploy:@@ -64,7 +65,7 @@ deploy:# - Paste the output down hereauth_token:secure: 3QI2PfimMZglT/OHzM9RG7iHw1LE2uld2vK003XoGXmpsSRWynwztsU5UIqqmRBQ- description: ''+ description: ""on:# TODO Here you can pick which targets will generate binary releases# In this example, there are some targets that are tested using the stablediff --git a/ci/before_deploy.ps1 b/ci/before_deploy.ps1index 0dab1318..6c5a7f5a 100755--- a/ci/before_deploy.ps1+++ b/ci/before_deploy.ps1@@ -1,17 +1,17 @@# This script takes care of packaging the build artifacts that will go in the# release zipfile-$SRC_DIR = $PWD.Path+$SRC_DIR = $pwd.Path$STAGE = [System.Guid]::NewGuid().ToString()-Set-Location $ENV:Temp+Set-Location $env:TEMPNew-Item -Type Directory -Name $STAGESet-Location $STAGE-$ZIP = "$SRC_DIR\$($Env:CRATE_NAME)-$($Env:APPVEYOR_REPO_TAG_NAME)-$($Env:TARGET).zip"+$ZIP = "$SRC_DIR\$($env:CRATE_NAME)-$($env:APPVEYOR_REPO_TAG_NAME)-$($env:TARGET).zip"# TODO Update this to package the right artifacts-Copy-Item "$SRC_DIR\target\$($Env:TARGET)\release\check_if_email_exists.exe" '.\'+Copy-Item "$SRC_DIR\target\$($Env:TARGET)\release\$(env:BIN_NAME).exe" '.\'7z a "$ZIP" *diff --git a/ci/before_deploy.sh b/ci/before_deploy.shdeleted file mode 100755index e897710d..00000000--- a/ci/before_deploy.sh+++ /dev/null@@ -1,33 +0,0 @@-# This script takes care of building your crate and packaging it for release--set -ex--main() {- local src=$(pwd) \- stage=-- case $TRAVIS_OS_NAME in- linux)- stage=$(mktemp -d)- ;;- osx)- stage=$(mktemp -d -t tmp)- ;;- esac-- test -f Cargo.lock || cargo generate-lockfile-- # TODO Update this to build the artifacts that matter to you- cross rustc --bin check_if_email_exists --target $TARGET --release -- -C lto-- # TODO Update this to package the right artifacts- cp target/$TARGET/release/check_if_email_exists $stage/-- cd $stage- tar czf $src/$CRATE_NAME-$TRAVIS_TAG-$TARGET.tar.gz *- cd $src-- rm -rf $stage-}--maindiff --git a/ci/install.sh b/ci/install.shdeleted file mode 100755index 80e18e47..00000000--- a/ci/install.sh+++ /dev/null@@ -1,47 +0,0 @@-set -ex--main() {- local target=- if [ $TRAVIS_OS_NAME = linux ]; then- target=x86_64-unknown-linux-musl- sort=sort- else- target=x86_64-apple-darwin- sort=gsort # for `sort --sort-version`, from brew's coreutils.- fi-- # Builds for iOS are done on OSX, but require the specific target to be- # installed.- case $TARGET in- aarch64-apple-ios)- rustup target install aarch64-apple-ios- ;;- armv7-apple-ios)- rustup target install armv7-apple-ios- ;;- armv7s-apple-ios)- rustup target install armv7s-apple-ios- ;;- i386-apple-ios)- rustup target install i386-apple-ios- ;;- x86_64-apple-ios)- rustup target install x86_64-apple-ios- ;;- esac-- # This fetches latest stable release- local tag=$(git ls-remote --tags --refs --exit-code https://github.com/japaric/cross \- | cut -d/ -f3 \- | grep -E '^v[0.1.0-9.]+$' \- | $sort --version-sort \- | tail -n1)- curl -LSfs https://japaric.github.io/trust/install.sh | \- sh -s -- \- --force \- --git japaric/cross \- --tag $tag \- --target $target-}--maindiff --git a/ci/script.sh b/ci/script.shdeleted file mode 100755index 6318df94..00000000--- a/ci/script.sh+++ /dev/null@@ -1,29 +0,0 @@-# This script takes care of testing your crate--set -ex--# TODO This is the "test phase", tweak it as you see fit-main() {- cross build --target $TARGET- cross build --target $TARGET --release-- if [ ! -z $DISABLE_TESTS ]; then- return- fi-- cross test --all --target $TARGET- cross test --all --target $TARGET --release-- # Run the binary with a $TEST_EMAIL, to test that the tool actually works.- # aka some quick e2e test on the binary itself- # TODO This only works on osx now, see #11- if [ $TRAVIS_OS_NAME = osx ]; then- cross run --target $TARGET $TEST_EMAIL | grep "\"is_deliverable\": true"- cross run --target $TARGET --release $TEST_EMAIL | grep "\"is_deliverable\": true"- fi-}--# we don't run the "test phase" when doing deploys-if [ -z $TRAVIS_TAG ]; then- main-fi