fix: ignore import type #328
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: Fitness Tracker Workflow | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
qualify_code: | |
runs-on: ubuntu-20.04 # ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
cache: pip | |
- name: Install and cache poetry | |
run: make -f .config/Makefile install-poetry | |
if: steps.cache.outputs.cache-hit != 'true' | |
- name: Cache poetry dependencies | |
id: cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pypoetry/virtualenvs | |
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} | |
restore-keys: ${{ runner.os }}-poetry- | |
- name: Install dependencies with poetry | |
run: poetry install | |
env: | |
POETRY_VIRTUALENVS_IN_PROJECT: true | |
if: steps.cache.outputs.cache-hit != 'true' | |
- name: Cache mypy dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/mypy | |
key: ${{ runner.os }}-mypy-${{ hashFiles('**/mypy.ini') }} | |
restore-keys: ${{ runner.os }}-mypy- | |
- name: Check poetry version | |
run: poetry --version | |
# - name: Format with Ruff | |
# run: poetry ruff format . | |
- name: Lint with ruff | |
run: make -f .config/Makefile lint-ruff | |
- name: Static type checks with mypy | |
run: make -f .config/Makefile static-type-checks | |
- name: wily build and rank | |
run: make -f .config/Makefile wily-build-and-rank | |
- name: Run ShellCheck | |
uses: ludeeus/action-shellcheck@master | |
- name: yamllint workout_programs | |
uses: ibiqlik/action-yamllint@v3 | |
with: | |
file_or_dir: "./docs/project_docs/Workout-Programs/workout_programs.yml" | |
- name: Check working directory | |
run: pwd | |
# - name: Set up working directory | |
# run: cd /home/runner/work/fitness-tracker/fitness-tracker | |
# - name: Set PYTHONPATH | |
# run: echo "PYTHONPATH=/home/runner/work/fitness-tracker/fitness-tracker" >> $GITHUB_ENV | |
- name: Set working directory | |
run: | | |
cd /home/runner/work/fitness-tracker/fitness-tracker | |
echo "PYTHONPATH=$PYTHONPATH:/home/runner/work/fitness-tracker/fitness-tracker" >> $GITHUB_ENV | |
# - name: Run pytest | |
# run: poetry run pytest --durations=10 test/test_model.py | |
# - name: BDD with Behave | |
# run: poetry run behave | |
# - name: Generate coverage report | |
# run: | | |
# poetry run pytest --cov=./ --cov-report=xml | |
# - name: Check folders | |
# run: | | |
# pwd | |
# ls | |
# ls -ll docs | |
# ls -ll docs/project_docs | |
# ls -ll docs/project_docs/workout-programs | |
- name: run tests and generate coverage | |
run: make -f .config/Makefile run-tests-and-coverage | |
env: | |
EMAIL: ${{ secrets.EMAIL }} | |
USER: ${{ secrets.USER }} | |
- uses: codecov/codecov-action@v4 | |
with: | |
# name: codecov-umbrella # optional | |
token: ${{ secrets.CODECOV_TOKEN }} | |
verbose: true # optional (default = false) | |
codecov_yml_path: .config/codecov.yml | |
- uses: rojopolis/[email protected] | |
name: Spellcheck | |
with: | |
config_path: .config/.spellcheck.yml | |
source_files: README.md # workout_programs.md | |
task_name: Markdown | |
# - name: Pydantic data validation | |
# run: poetry run python src/helpers/validate.py | |
# deploy_to_AWS_ECR: | |
# needs: qualify_code | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Check out repository code | |
# uses: actions/checkout@v4 | |
# - name: Configure AWS credentials | |
# uses: aws-actions/configure-aws-credentials@v4 | |
# with: | |
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
# aws-region: eu-central-1 | |
# - name: Login to AWS ECR | |
# id: login-ecr | |
# uses: aws-actions/amazon-ecr-login@v2 | |
# - name: Build, tag, and push image to Amazon ECR | |
# env: | |
# ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} | |
# ECR_REPOSITORY: fitness-tracker | |
# IMAGE_TAG: ft-image | |
# run: | | |
# docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . | |
# docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG |