TradingMate CI #719
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
name: TradingMate CI | |
on: | |
push: | |
pull_request: | |
branches: | |
- master | |
schedule: | |
- cron: '0 0 * * 0' # weekly | |
env: | |
poetry-version: '1.1.12' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.7', '3.8', '3.9', '3.10'] | |
name: Python ${{ matrix.python-version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4.1.0 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
- name: Pip cache | |
uses: actions/cache@v3.0.11 | |
with: | |
# This path is specific to Ubuntu | |
path: ~/.cache/pip | |
# Look to see if there is a cache hit for the corresponding poetry.lock | |
key: ${{ runner.os }}-pip-${{ env.poetry-version }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
${{ runner.os }}- | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install 'poetry==${{ env.poetry-version }}' | |
- name: Poetry cache | |
uses: actions/cache@v3.0.11 | |
with: | |
path: ~/.cache/pypoetry/virtualenvs | |
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} | |
restore-keys: | | |
${{ runner.os }}-poetry- | |
- name: Run tests | |
run: make ci |