-
Notifications
You must be signed in to change notification settings - Fork 61
42 lines (36 loc) · 1.02 KB
/
test_pr.yml
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
name: Test PR
on:
pull_request_target:
jobs:
authorize:
environment:
${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository && 'external' || 'internal' }}
runs-on: ubuntu-latest
steps:
- run: true
test:
needs: authorize
runs-on: ubuntu-latest
strategy:
max-parallel: 4
fail-fast: false
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install SRT
run: |
python -m pip install --upgrade pip
pip install -e ".[test]"
- name: Run tests
env:
SRT_PASSWORD: ${{ secrets.SRT_PASSWORD }}
SRT_USERNAME: ${{ secrets.SRT_USERNAME }}
run: |
pytest tests -x -v