Update workflows

This commit is contained in:
Chavithra PARANA
2022-03-16 14:43:20 +01:00
parent cfb911cdc9
commit d7c0d22fe0

View File

@@ -37,64 +37,6 @@ jobs:
- run: safety check
- run: |
pylint terminal.py gamestonk_terminal discordbot tests
test:
name: Base Tests - Ubuntu-latest - Python 3.9
needs: linting
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup Python 3.9
uses: actions/setup-python@v2
with:
python-version: "3.9"
architecture: x64
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.1.11
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Install Package
run: poetry install --no-interaction
- name: Run tests
env:
MPLBACKEND: Agg
run: |
source $VENV
pytest tests/
- name: Start Terminal and exit
run: |
source $VENV
python terminal.py
markdown-link-check:
name: Markdown Linting
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
steps:
- uses: actions/checkout@v2
name: Check out the code
- name: Lint Code Base
uses: docker://avtodev/markdown-lint:v1
with:
args: "./*.md ./changelogs/*.md ./gamestonk_terminal/**/*.md ./discordbot/**/*.md"
tests-python:
name: Vanilla Python Tests - (${{ matrix.python-version }}, ${{ matrix.os }})
needs: test
@@ -156,6 +98,64 @@ jobs:
run: |
source $VENV
python terminal.py
test:
name: Base Tests - Ubuntu-latest - Python 3.9
needs: linting
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup Python 3.9
uses: actions/setup-python@v2
with:
python-version: "3.9"
architecture: x64
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.1.11
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Install Package
run: poetry install --no-interaction
- name: Run tests
env:
MPLBACKEND: Agg
run: |
source $VENV
pytest tests/
- name: Start Terminal and exit
run: |
source $VENV
python terminal.py
markdown-link-check:
name: Markdown Linting
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
steps:
- uses: actions/checkout@v2
name: Check out the code
- name: Lint Code Base
uses: docker://avtodev/markdown-lint:v1
with:
args: "./*.md ./changelogs/*.md ./gamestonk_terminal/**/*.md ./discordbot/**/*.md"
tests-conda:
name: Anaconda Python Tests - (${{ matrix.python-version }}, ${{ matrix.os }})
needs: test