feat: amino acid translation by nextclade #36
Workflow file for this run
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
# This pipeline checks whether the package | |
# installs properly, passes unit tests and whether | |
# the code formatting is right. | |
name: CI/CD | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
python-version: ["3.10"] | |
poetry-version: ["1.8.3"] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Conda | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
environment-file: environment.yml | |
activate-environment: myenv | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
version: ${{ matrix.poetry-version }} | |
- name: Cache dependencies | |
id: cache-deps | |
uses: actions/cache@v2 | |
with: | |
path: .venv | |
key: pydeps-${{ hashFiles('**/poetry.lock') }} | |
- name: Activate Conda environment | |
shell: bash -l {0} | |
run: | | |
source $(conda info --base)/etc/profile.d/conda.sh | |
conda activate myenv | |
- name: Set Python version for Poetry | |
run: poetry env use $(which python) | |
- name: Install the dependencies | |
run: poetry install --no-interaction --no-root --with dev | |
if: steps.cache-deps.outputs.cache-hit != 'true' | |
- name: Install the module | |
run: poetry install --with dev --no-interaction | |
- name: Run unit tests | |
run: poetry run pytest | |
- name: Run Ruff | |
run: poetry run ruff check . | |
- name: Run interrogate | |
run: poetry run interrogate src | |
- name: Run Pyright (type checking) | |
run: poetry run pyright |