-
Notifications
You must be signed in to change notification settings - Fork 2
69 lines (66 loc) · 2.14 KB
/
Copy pathpull_request.yml
File metadata and controls
69 lines (66 loc) · 2.14 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Checks performed on all pull requests, to any branch. Thus, required for protected branches,
# but enables a workflow for CI validation against non-protected branches as well.
name: PR checker
on: pull_request
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v3
with:
python-version: '3.13'
- name: Install linters
run: |
python -m pip install --upgrade pip
pip install .[test] pre-commit
pre-commit install
- name: Run code quality checks
run: |
pre-commit run --all
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
py: ['3.10', '3.11', '3.12', '3.13']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.py }}
- name: Configure SSH
if: matrix.os != 'windows-latest'
run: |
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N ''
cat > ~/.ssh/config <<EOF
Host *
IdentityFile ~/.ssh/id_ed25519
EOF
cat ~/.ssh/id_ed25519.pub > ~/.ssh/authorized_keys
chmod -R 700 ~/.ssh
- name: Verify Local SSH
if: matrix.os != 'windows-latest'
run: |
ssh -o StrictHostKeyChecking=no -o ConnectTimeout=10 -o BatchMode=yes $USER@localhost "echo It works"
- name: Install Rsync
if: matrix.os == 'macos-latest'
run: brew install rsync
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[test,sftp]
- name: Run unit tests (using local SSH)
if: matrix.os != 'windows-latest'
run: |
mkdir -p sandbox
cd sandbox
enderchest test -vv --doctest-modules --ignore-glob="docs/**" --log-level=DEBUG --use-local-ssh
- name: Run unit tests (using mock SSH)
if: matrix.os == 'windows-latest'
run: |
mkdir -p sandbox
cd sandbox
enderchest test -vv --doctest-modules --ignore-glob="docs/**" --log-level=DEBUG