You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.3 KiB
46 lines
1.3 KiB
on:
|
|
push:
|
|
branches:
|
|
- '**'
|
|
tags-ignore: ['*']
|
|
workflow_dispatch:
|
|
pull_request_target:
|
|
types: [labeled]
|
|
|
|
name: Integration Tests
|
|
|
|
jobs:
|
|
proxy_tests:
|
|
name: Proxy Tests
|
|
runs-on: ubuntu-latest
|
|
if: github.actor != 'dependabot[bot]' && github.actor != 'github-actions[bot]' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request_target' && !github.event.pull_request.head.repo.fork && contains(github.event.pull_request.labels.*.name, 'safe to test')))
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- name: Populate .env
|
|
env:
|
|
DOTENV: ${{ secrets.DOTENV }}
|
|
run: |
|
|
echo "$DOTENV" > tests/.env
|
|
ln -s tests/.env
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.x'
|
|
|
|
- name: Create virtual environment
|
|
run: python -m venv venv
|
|
|
|
- name: Activate virtual environment and install dependencies
|
|
run: |
|
|
source venv/bin/activate
|
|
pip install -r tests/requirements.txt
|
|
|
|
- name: Build project
|
|
run: cargo build --release
|
|
|
|
- name: Run tests
|
|
run: |
|
|
source venv/bin/activate
|
|
python tests/tests.py
|
|
|