Skip to content

Feature/scrub interpreter #231

Feature/scrub interpreter

Feature/scrub interpreter #231

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
branches:
- develop
- master
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- develop
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:13
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: users
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Checkout sarzak
uses: actions/checkout@v2
with:
ref: develop
path: sarzak
repository: 'uberfoo/sarzak'
- name: Checkout sarzak-cli
uses: actions/checkout@v2
with:
ref: develop
path: sarzak-cli
repository: 'uberfoo/sarzak-cli'
- name: Build sarzak-cli
run: |
cd sarzak-cli
cargo install --path .
cd ..
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
path: dwarf
- name: Install PostgreSQL client
run: |
cargo install sqlx-cli --no-default-features --features postgres
cd dwarf/tests/setup/database
export DATABASE_URL=postgres://postgres:postgres@localhost/users
sqlx database create
sqlx migrate run
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Install dwarf
run: |
cd dwarf
cargo xtask install
cargo xtask plugin
- name: Build and run tests with coverage
run: |
cd dwarf
RUST_MIN_STACK=6291456 cargo llvm-cov --lcov --output-path coverage.lcov --no-default-features --features "lu-dog-rc, repl, async"
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
working-directory: .
fail_ci_if_error: true
# files: ./coverage.xml
files: coverage.lcov
flags: unittests
name: codecov-umbrella
verbose: true