Skip to content

Commit

Permalink
Update GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
billy1624 committed Aug 4, 2021
1 parent 8a6d3c0 commit 5cfe0cc
Showing 1 changed file with 32 additions and 10 deletions.
42 changes: 32 additions & 10 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,37 @@ jobs:
test:
name: Unit Test
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- uses: Swatinem/rust-cache@v1

- uses: actions-rs/cargo@v1
with:
command: build
args: >
--all
- uses: actions-rs/cargo@v1
with:
command: test

postgres:
name: Postgres
runs-on: ubuntu-20.04
strategy:
matrix:
version: [13.3, 12.7, 11.12, 10.17, 9.6.22]
project: [live]
services:
postgres:
image: postgres:11
image: postgres:${{ matrix.version }}
env:
POSTGRES_HOST: 127.0.0.1
POSTGRES_USER: sea
Expand All @@ -38,22 +66,16 @@ jobs:
toolchain: stable
override: true

- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-test-${{ hashFiles('**/Cargo.lock') }}
- uses: Swatinem/rust-cache@v1

- uses: actions-rs/cargo@v1
with:
command: build
args: >
--all
--manifest-path tests/${{ matrix.project }}/postgres/Cargo.toml
- uses: actions-rs/cargo@v1
with:
command: test
args: >
--all
--manifest-path tests/${{ matrix.project }}/postgres/Cargo.toml

0 comments on commit 5cfe0cc

Please sign in to comment.