forked from tun2proxy/tun2proxy
-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (39 loc) · 1.31 KB
/
Copy pathtests.yml
File metadata and controls
46 lines (39 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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