Add security check to GitHub Actions workflow
This commit is contained in:
31
.github/workflows/main.yml
vendored
31
.github/workflows/main.yml
vendored
@@ -6,38 +6,9 @@ on:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
# Run unit tests for the project
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5.3.0
|
||||
with:
|
||||
python-version: '3.12.3'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install pytest
|
||||
pip install -r requirements.txt
|
||||
|
||||
- name: Run unit tests
|
||||
run: |
|
||||
python -m pytest tests/
|
||||
|
||||
#run security check
|
||||
- name: pyupio/safety-action
|
||||
uses: pyupio/safety-action@v1.0.1
|
||||
with:
|
||||
api-key: ${{ secrets.SAFETY_API_KEY }}
|
||||
|
||||
# Build and push package to GitHub Container Registry (GHCR)
|
||||
build-and-push-to-ghcr:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test # This job depends on the test job
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out the repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
Reference in New Issue
Block a user