diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml new file mode 100644 index 0000000..815926a --- /dev/null +++ b/.github/workflows/push.yml @@ -0,0 +1,47 @@ +name: Push + +on: + push: + branches: + - main + - master + pull_request: + branches: + - main + - master + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + rust-version: [stable, beta, nightly] + + services: + postgres: + image: postgres:16.3 + env: + POSTGRES_PASSWORD: postgres + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 5432:5432 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Set up Rust + uses: moonrepo/setup-rust@v1 + with: + channel: ${{ matrix.rust-version }} + bins: cargo-nextest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Install PostgreSQL + run: sudo apt-get install postgresql + - name: Build and test + run: cargo nextest run --features diesel-uuid + env: + PG_DATABASE_URL: postgres://postgres:postgres@localhost/postgres diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 730d70e..0000000 --- a/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -language: rust -#sudo: required -dist: trusty -rust: - - stable - - beta - - nightly -cache: cargo -addons: - postgresql: '9.5' -script: - - cargo test --features diesel-uuid -env: - global: - - PG_DATABASE_URL=postgres://postgres@localhost/