Merge pull request #51 from cea-sec/dependabot/cargo/tls-listener-0.8.0 #144
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update && \ | |
sudo apt-get install -y --no-install-recommends \ | |
libkrb5-dev \ | |
libssl-dev | |
- name: Install a Postgres database (CockroachDB) | |
run: | | |
git clone https://github.com/cockroachlabs-field/docker-examples.git | |
cd docker-examples/example-nginx/ | |
sh up.sh | |
- name: Build | |
run: cargo build --verbose | |
- name: Run tests | |
run: | | |
# Env var to connect to the Postgres docker | |
export POSTGRES_HOST="localhost" | |
export POSTGRES_PORT="26257" | |
export POSTGRES_USER="root" | |
export POSTGRES_PASSWORD="" | |
export POSTGRES_DBNAME="test" | |
cargo test --verbose |