-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (58 loc) · 1.99 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: CI Pipeline
on:
push:
branches:
- main # Run on pushes to the main branch
pull_request: # Run on pull requests
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Setup - Check out code
uses: actions/checkout@v3
- name: Setup - Download Conda
run: |
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
echo "$HOME/miniconda/bin" >> $GITHUB_PATH
- name: Setup - List Conda Environments
run: |
source $HOME/miniconda/etc/profile.d/conda.sh
conda info --envs
- name: Setup - Conda Venv
run: |
conda create --name tcr_embeddings python=3.12 -y
conda env list
- name: Setup - Activate Conda
run: |
source $HOME/miniconda/etc/profile.d/conda.sh # This ensures conda works in the current shell
conda activate tcr_embeddings
- name: Setup - Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry
poetry install
python -m pip install numpy pandas virtualenv
- name: Setup - CI/CD Packages
run: |
python -m pip install black isort flake8 flake8-pyproject mypy
python -m pip install isort[colors]
- name: Check - Code Formatting [black]
run: black . --check
if: always()
- name: Check - Import Order [isort]
run: isort . --check --diff
if: always()
- name: Check - Linting [flake8]
run: flake8 .
if: always()
- name: Check - Types [mypy]
run: mypy .
if: always()
- name: Check - Unit Tests [unittest]
run: |
python -m pip list
python -m test.temporarily-change-constants
poetry run python -m unittest discover -s test -p "*test*.py" -v
python -m test.revert-default-constants
if: always()