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:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
pull_request:
|
|
||||||
branches: [ main ]
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: linux
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Debug
|
||||||
run: |
|
run: |
|
||||||
|
echo "Runner: $OSTYPE"
|
||||||
|
id
|
||||||
pwd
|
pwd
|
||||||
ls -la
|
- name: Install Python
|
||||||
- name: Test Python
|
|
||||||
run: |
|
run: |
|
||||||
python3 --version
|
if command -v python3 &> /dev/null; then
|
||||||
pip3 --version
|
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
|
- name: Install deps
|
||||||
run: |
|
run: |
|
||||||
pip3 install -e ".[dev]"
|
pip3 install -e ".[dev]" --quiet
|
||||||
- name: Run lint
|
- name: Lint
|
||||||
run: |
|
run: |
|
||||||
ruff check src/
|
ruff check src/
|
||||||
- name: Run type check
|
- name: Type check
|
||||||
run: |
|
run: |
|
||||||
mypy src/
|
mypy src/
|
||||||
- name: Run tests
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
pytest tests/ -v
|
pytest tests/ -v
|
||||||
Reference in New Issue
Block a user