Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bb0fb4c8cf | |||
| 086d3e6e0f | |||
| 4ca943163d | |||
| 848abe2c3b | |||
| cd7b0ec04c | |||
| bdb632598a | |||
| e50f4756a6 | |||
| c3ffbdbf7b | |||
| 95df54e0e2 | |||
| f187d09958 | |||
| 7fcee69c0f | |||
| 7b949db9c3 | |||
| ee37608bfc | |||
| f1fd17bec0 | |||
| 5dc4d680ec | |||
| 1872f4c7af | |||
| 9c9213c59d | |||
| 00246d6594 | |||
| d987118849 |
42
.gitea/workflows/ci.yml
Normal file
42
.gitea/workflows/ci.yml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
cache: 'pip'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: python -m pip install --upgrade pip pytest
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: python -m pytest tests/test_cli_commands.py tests/test_encryption.py tests/test_profile.py tests/test_template.py tests/test_validator.py -v
|
||||||
|
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: test
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
|
||||||
|
- name: Build package
|
||||||
|
run: pip install build && python -m build
|
||||||
|
|
||||||
|
- name: Verify package
|
||||||
|
run: pip install dist/*.whl && python -m env_pro.cli --help
|
||||||
@@ -20,41 +20,16 @@ jobs:
|
|||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
|
cd app
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install -e ".[dev]"
|
pip install -e ".[dev]"
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: pytest tests/ -v --tb=short
|
|
||||||
|
|
||||||
- name: Run type checks
|
|
||||||
run: |
|
run: |
|
||||||
pip install mypy
|
cd app
|
||||||
mypy env_pro/ --ignore-missing-imports || true
|
pytest tests/ -v --tb=short
|
||||||
|
|
||||||
- name: Check code formatting
|
- name: Check code formatting
|
||||||
run: |
|
run: |
|
||||||
pip install black ruff
|
cd app
|
||||||
black --check env_pro/ || true
|
ruff check env_pro/
|
||||||
ruff check env_pro/ || true
|
|
||||||
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: test
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: '3.11'
|
|
||||||
|
|
||||||
- name: Install build dependencies
|
|
||||||
run: pip install build
|
|
||||||
|
|
||||||
- name: Build package
|
|
||||||
run: python -m build
|
|
||||||
|
|
||||||
- name: Verify package
|
|
||||||
run: |
|
|
||||||
pip install dist/*.whl
|
|
||||||
env-pro --help
|
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ dev = [
|
|||||||
"pytest>=7.4.0",
|
"pytest>=7.4.0",
|
||||||
"pytest-cov>=4.1.0",
|
"pytest-cov>=4.1.0",
|
||||||
"pytest-mock>=3.12.0",
|
"pytest-mock>=3.12.0",
|
||||||
|
"ruff>=0.1.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
|
|||||||
@@ -9,3 +9,4 @@ keyring>=24.3.0
|
|||||||
pytest>=7.4.0
|
pytest>=7.4.0
|
||||||
pytest-cov>=4.1.0
|
pytest-cov>=4.1.0
|
||||||
pytest-mock>=3.12.0
|
pytest-mock>=3.12.0
|
||||||
|
ruff>=0.1.0
|
||||||
|
|||||||
Reference in New Issue
Block a user