|
|
|
|
@ -16,7 +16,7 @@ jobs: |
|
|
|
|
strategy: |
|
|
|
|
max-parallel: 1 |
|
|
|
|
matrix: |
|
|
|
|
python-version: ['3.7', '3.8', '3.9', '3.10'] |
|
|
|
|
python-version: ['3.10', '3.9', '3.8', '3.7'] |
|
|
|
|
runs-on: ubuntu-latest |
|
|
|
|
steps: |
|
|
|
|
- name: Download code |
|
|
|
|
@ -47,6 +47,7 @@ jobs: |
|
|
|
|
if: steps.poetry-install.outputs.cache-hit != 'true' |
|
|
|
|
run: rm -rf ./.venv/ && poetry install |
|
|
|
|
- name: Download cache for pre-commit |
|
|
|
|
if: matrix.python-version == '3.10' |
|
|
|
|
id: pre-commit-install |
|
|
|
|
uses: actions/cache@v2 |
|
|
|
|
with: |
|
|
|
|
@ -54,12 +55,14 @@ jobs: |
|
|
|
|
key: py-${{ matrix.python-version }}-pre-commit-install-${{ hashFiles('.pre-commit-config.yaml') }} |
|
|
|
|
restore-keys: pre-commit-install |
|
|
|
|
- name: Verify commit |
|
|
|
|
if: matrix.python-version == '3.10' |
|
|
|
|
run: poetry run pre-commit run -a |
|
|
|
|
- name: Auto-generate missing pairs |
|
|
|
|
run: | |
|
|
|
|
. activate.sh && poetry run python generatestructs.py |
|
|
|
|
poetry run python generatestructs.py |
|
|
|
|
- name: Commit & Push changes |
|
|
|
|
if: matrix.python-version == '3.10' |
|
|
|
|
uses: actions-js/push@v1.3 |
|
|
|
|
with: |
|
|
|
|
author_email: "morty.space@gmail.com" |
|
|
|
|
@ -68,6 +71,7 @@ jobs: |
|
|
|
|
message: "[BOT] Updated API pairs and coins" |
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }} |
|
|
|
|
- name: Prepare codeclimate |
|
|
|
|
if: matrix.python-version == '3.10' |
|
|
|
|
run: | |
|
|
|
|
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter |
|
|
|
|
chmod +x ./cc-test-reporter |
|
|
|
|
@ -78,6 +82,7 @@ jobs: |
|
|
|
|
timeout-minutes: 5 |
|
|
|
|
run: . activate.sh && poetry run pytest -v --cov . --cov-report xml:coverage.xml |
|
|
|
|
- name: Send codeclimate analytics |
|
|
|
|
if: matrix.python-version == '3.10' |
|
|
|
|
run: ./cc-test-reporter after-build -r ${{ secrets.CC_TEST_REPORTER_ID }} --exit-code $? |
|
|
|
|
release: |
|
|
|
|
runs-on: ubuntu-latest |
|
|
|
|
|