Skip to content

Upgrade cargo-shuttle #121

Upgrade cargo-shuttle

Upgrade cargo-shuttle #121

Workflow file for this run

name: Continuous integration
on: [push, pull_request]
jobs:
check:
name: Check (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: check
test:
name: Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: neondatabase/create-branch-action@v4
with:
project_id: ${{ vars.NEON_PROJECT_ID }}
parent: test
branch_name: test-${{ matrix.os }}-$GITHUB_SHA-$GITHUB_REF
username: ${{ vars.NEON_ROLE }}
api_key: ${{ secrets.NEON_API_KEY }}
id: create-branch
- uses: actions-rs/cargo@v1
with:
command: test
env:
TEST_DB_URL: ${{ steps.create-branch.outputs.db_url }}
- uses: neondatabase/delete-branch-action@v3
if: always()
with:
project_id: ${{ vars.NEON_PROJECT_ID }}
branch: ${{ steps.create-branch.outputs.branch_id }}
api_key: ${{ secrets.NEON_API_KEY }}
fmt:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets -- -D warnings