Fix CI/CD workflow: use setup-python instead of container
- Remove container directive that caused Node.js missing error - Use actions/setup-python@v5 for Python 3.12 setup - Add sudo for apt-get and make commands on Ubuntu runner - Add ruff format check step
This commit is contained in:
@@ -14,19 +14,22 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
|
||||||
image: python:3.12-slim
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.12'
|
||||||
|
|
||||||
- name: Install system dependencies
|
- name: Install system dependencies
|
||||||
run: |
|
run: |
|
||||||
apt-get update
|
sudo apt-get update
|
||||||
apt-get install -y --no-install-recommends build-essential wget
|
sudo apt-get install -y --no-install-recommends build-essential wget
|
||||||
wget -q http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz
|
wget -q http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz
|
||||||
tar -xzf ta-lib-0.4.0-src.tar.gz
|
tar -xzf ta-lib-0.4.0-src.tar.gz
|
||||||
cd ta-lib && ./configure --prefix=/usr && make && make install
|
cd ta-lib && ./configure --prefix=/usr && sudo make && sudo make install
|
||||||
cd .. && rm -rf ta-lib ta-lib-0.4.0-src.tar.gz
|
cd .. && rm -rf ta-lib ta-lib-0.4.0-src.tar.gz
|
||||||
|
|
||||||
- name: Install Python dependencies
|
- name: Install Python dependencies
|
||||||
@@ -37,6 +40,9 @@ jobs:
|
|||||||
- name: Run linting
|
- name: Run linting
|
||||||
run: ruff check .
|
run: ruff check .
|
||||||
|
|
||||||
|
- name: Run format check
|
||||||
|
run: ruff format --check .
|
||||||
|
|
||||||
- name: Run type checking
|
- name: Run type checking
|
||||||
run: mypy src/
|
run: mypy src/
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user