Skip to content

Commit 5baf1a1

Browse files
committed
Add CICD pipeline
1 parent 59785d5 commit 5baf1a1

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# .github/workflows/ci.yml
2+
name: CI
3+
on:
4+
push:
5+
branches: [feature/initial-design]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
ci:
11+
name: "pyCosign CI Pipeline | (Python ${{ matrix.python-version }})"
12+
strategy:
13+
matrix:
14+
python-version: ["3.10"]
15+
poetry-version: ["2.1.3"]
16+
os: [ubuntu-22.04]
17+
runs-on: ${{ matrix.os }}
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
- name: Install poetry
25+
uses: abatilo/actions-poetry@v4
26+
- name: Setup a local virtual environment (if no poetry.toml file)
27+
run: |
28+
poetry config virtualenvs.create true --local
29+
poetry config virtualenvs.in-project true --local
30+
- uses: actions/cache@v3
31+
name: Define a cache for the virtual environment based on the dependencies lock file
32+
with:
33+
path: ./.venv
34+
key: venv-${{ hashFiles('poetry.lock') }}
35+
- name: Install the project dependencies
36+
run: poetry install
37+
- name: Run Black in check mode
38+
run: poetry run black --check --verbose pycosign

0 commit comments

Comments
 (0)