fix: use 'linux' runner and install python if missing
Some checks failed
CI / test (push) Has been cancelled
Some checks failed
CI / test (push) Has been cancelled
This commit is contained in:
@@ -3,30 +3,36 @@ name: CI
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: linux
|
||||
steps:
|
||||
- name: Checkout
|
||||
- name: Debug
|
||||
run: |
|
||||
echo "Runner: $OSTYPE"
|
||||
id
|
||||
pwd
|
||||
ls -la
|
||||
- name: Test Python
|
||||
- name: Install Python
|
||||
run: |
|
||||
python3 --version
|
||||
pip3 --version
|
||||
if command -v python3 &> /dev/null; then
|
||||
echo "Python3 found"
|
||||
python3 --version
|
||||
else
|
||||
echo "Python3 not found, installing..."
|
||||
apt-get update -qq
|
||||
apt-get install -y -qq python3 python3-pip > /dev/null 2>&1
|
||||
python3 --version
|
||||
fi
|
||||
- name: Install deps
|
||||
run: |
|
||||
pip3 install -e ".[dev]"
|
||||
- name: Run lint
|
||||
pip3 install -e ".[dev]" --quiet
|
||||
- name: Lint
|
||||
run: |
|
||||
ruff check src/
|
||||
- name: Run type check
|
||||
- name: Type check
|
||||
run: |
|
||||
mypy src/
|
||||
- name: Run tests
|
||||
- name: Test
|
||||
run: |
|
||||
pytest tests/ -v
|
||||
Reference in New Issue
Block a user