Skip to content

Integration tests (#5) #20

Integration tests (#5)

Integration tests (#5) #20

Workflow file for this run

name: Test
on:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
container:
image: antonengelhardt/rust-docker-tools
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Cache dependencies
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Cargo Deny
uses: EmbarkStudios/cargo-deny-action@v1
- name: Run Rust tests
run: |
rustc --version && cargo --version
cargo clippy
cargo test --workspace --verbose
integration-test:
runs-on: ubuntu-latest
container:
image: antonengelhardt/rust-docker-tools
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Create .env for Integration tests
run: |
echo "CI=true" >> integration-tests/.env
echo "WASM_OIDC_PLUGIN_TEST_EMAIL={{ secrets.WASM_OIDC_PLUGIN_TEST_EMAIL }}" >> integration-tests/.env
echo "WASM_OIDC_PLUGIN_TEST_PASSWORD={{ secrets.WASM_OIDC_PLUGIN_TEST_PASSWORD }}" >> integration-tests/.env
sed -i "client_secret: redacted/client_secret: ${{ secrets.WASM_OIDC_PLUGIN_TEST_CLIENT_SECRET }}" integration-tests/.env
- name: Install Chrome, Chromedriver, Docker, Docker-Compose and Python (and pip)
run: |
apk update
apk add chromium
apk add chromium-chromedriver
apk add docker
apk add docker-compose
apk add python3
apk add py3-pip
- name: Install Requirements
run: |
pip install -r integration-tests/requirements.txt
- name: Build
run: |
cargo build --target wasm32-wasi --release
- name: Docker-Compose up
run: |
cd integration-tests
docker-compose up -d
- name: Run Integration tests
run: |
pytest test.py