mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-05-31 11:52:14 +00:00
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
on:
|
|
pull_request_review:
|
|
types: [submitted]
|
|
push:
|
|
workflow_dispatch:
|
|
pull_request_target:
|
|
types: [labeled]
|
|
|
|
name: Integration Tests
|
|
|
|
jobs:
|
|
proxy_tests:
|
|
name: Proxy Tests
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'safe to test')
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
- name: Populate .env
|
|
env:
|
|
DOTENV: ${{ secrets.DOTENV }}
|
|
run: echo "$DOTENV" > .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
|