-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from smorin/feature/ci-github-action
adding branch for new github action
- Loading branch information
Showing
4 changed files
with
117 additions
and
25 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# .github/workflows/ci.yml | ||
name: CI/CD | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
test: | ||
name: continuous-integration | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.10", "3.11"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install uv | ||
uses: astral-sh/setup-uv@v5 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install the project | ||
run: uv sync --all-extras --dev | ||
|
||
# - name: Run tests | ||
# # For example, using `pytest` | ||
# run: uv run pytest tests | ||
|
||
# Format code | ||
- name: Format code | ||
run: uvx black py_launch_blueprint/ --check | ||
|
||
- name: Sort imports | ||
run: uvx isort py_launch_blueprint/ --check | ||
|
||
- name: Run type checker | ||
run: uvx mypy py_launch_blueprint/ | ||
|
||
- name: Check linters | ||
run: uvx ruff check py_launch_blueprint/ | ||
|
||
# - name: Run tests with coverage | ||
# run: | | ||
# pytest --cov=./ --cov-report=xml | ||
|
||
# - name: Upload coverage | ||
# uses: codecov/codecov-action@v4 | ||
|
||
security: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Run Safety CLI to check for vulnerabilities | ||
uses: pyupio/safety-action@v1 | ||
with: | ||
api-key: ${{ secrets.SAFETY_API_KEY }} | ||
args: --detailed-output # To always see detailed output from this action | ||
|
||
# publish: | ||
# needs: [test, security] | ||
# if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
|
||
# - name: Build and publish to PyPI | ||
# env: | ||
# TWINE_USERNAME: __token__ | ||
# TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | ||
# run: | | ||
# uv pip install build twine | ||
# python -m build | ||
# twine upload dist/* |
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 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 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