forked from artefactory/xhec-mlops-project-student
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (40 loc) · 1.47 KB
/
ci.yaml
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
name: CI
on: [push, pull_request]
jobs:
CI:
name: Launching CI
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
steps:
# Step 1: Checkout the repository
- uses: actions/checkout@v2
# Step 2: Set up the desired Python version
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# Step 3: Install pip-tools
- name: Install pip-tools
run: |
pip install pip-tools
# Step 4: Compile and install dependencies from requirements.in
- name: Compile and install dependencies from requirements.in
run: |
pip-compile requirements.in
pip install -r requirements.txt
# Step 5: Compile and install development dependencies (linters, formatters, pre-commit)
- name: Compile and install dev dependencies from requirements-dev.in
run: |
pip-compile requirements-dev.in
pip install -r requirements-dev.txt
# Step 6: Install pre-commit hooks
- name: Install pre-commit hooks
run: |
pip install pre-commit
pre-commit install # Install the hooks defined in the configuration file
# Step 7: Run pre-commit hooks (including formatters and linters) across all files
- name: Run pre-commit checks (Linters & Formatters)
run: |
pre-commit run --all-files