Skip to content

279 e2e test enrollment process #967

279 e2e test enrollment process

279 e2e test enrollment process #967

Workflow file for this run

name: Continuous integration
on:
push:
branches:
- main
paths-ignore:
- '*.md'
- 'LICENSE'
pull_request:
branches:
- main
paths-ignore:
- '*.md'
- 'LICENSE'
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: self-hosted
container: rust:latest
services:
postgres:
image: postgres:14-alpine
env:
POSTGRES_DB: defguard
POSTGRES_USER: defguard
POSTGRES_PASSWORD: defguard
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Debug
run: echo ${{ github.ref_name }}
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install protoc
run: apt-get update && apt-get -y install protobuf-compiler
- name: Check format
run: |
rustup component add rustfmt
cargo fmt -- --check
- name: Run tests
env:
DEFGUARD_SECRET_KEY: aa5a506b11d719dd7170f57f5d9947faf8eb0bc2be1325e42aa0237c3dcfd26456e73dff9eef3b12c7bcf8711b45e3e703d8e21ee1c08520f5e12e3f5772da94
DEFGUARD_DB_HOST: postgres
DEFGUARD_DB_PORT: 5432
DEFGUARD_DB_NAME: defguard
DEFGUARD_DB_USER: defguard
DEFGUARD_DB_PASSWORD: defguard
DATABASE_URL: "postgresql://defguard:defguard@postgres/defguard"
SQLX_OFFLINE: true
run: cargo test --locked --no-fail-fast