v0.1.6 Release #217
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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@v3 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.12' | |
- 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'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
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 |