Symbolscanner #250
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: Symbolscanner | |
on: | |
schedule: | |
- cron: '0 13 * * 1' | |
workflow_dispatch: | |
jobs: | |
scan: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.11] | |
poetry-version: [1.7.1] | |
steps: | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt-get install libcurl4-openssl-dev | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache poetry installation | |
uses: actions/cache@v2 | |
with: | |
path: ~/.local | |
key: poetry-${{ matrix.python-version }}-${{ matrix.poetry-version }} | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: ${{ matrix.poetry-version }} | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: .venv | |
key: pydeps-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
run: poetry install --no-interaction --no-root | |
if: steps.cache-deps.outputs.cache-hit != 'true' | |
- name: Run tests | |
run: | | |
source .venv/bin/activate | |
pip3 install pysymbolscanner | |
poetry run pysymbolscanner --input stocks.yaml --output stocks.yaml | |
python3 tools/yaml2data.py | |
export SKIP_TEST_VALID_COUNTRY_NAME='true' | |
export SKIP_TEST_UNIQUE_TICKER_SYMBOLS='true' | |
poetry run pytest | |
- name: Coveralls | |
uses: AndreMiras/coveralls-python-action@develop | |
with: | |
parallel: true | |
debug: true | |
- name: Publish Unit Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v1 | |
if: always() | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
files: test-results/**/*.xml | |
- name: Coveralls | |
uses: AndreMiras/coveralls-python-action@develop | |
with: | |
parallel: true | |
debug: true | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
commit-message: 'fix: update stock symbols' | |
title: 'fix: update index components' | |
body: | | |
Auto-generated PR by pysymbolscanner | |
labels: Cron | |
branch-suffix: timestamp | |
branch: feature/fix_indices_components | |
base: master | |
coveralls_finish: | |
needs: scan | |
runs-on: ubuntu-latest | |
steps: | |
- name: Coveralls Finished | |
uses: AndreMiras/coveralls-python-action@develop | |
with: | |
parallel-finished: true | |
debug: true |