Skip to content

Bump virtualenv from 20.31.2 to 20.35.4 #43

Bump virtualenv from 20.31.2 to 20.35.4

Bump virtualenv from 20.31.2 to 20.35.4 #43

Workflow file for this run

name: build
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
paths:
- '**.py'
- 'requirements.txt'
- 'pyproject.toml'
- 'setup.py'
- 'setup.cfg'
pull_request:
branches: [ "main" ]
paths:
- '**.py'
- 'requirements.txt'
- 'pyproject.toml'
- 'setup.py'
- 'setup.cfg'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
# Validate requirements file
- name: Validate requirements
run: |
if [ ! -f requirements.txt ]; then
echo "requirements.txt not found"
exit 1
fi
if grep -E "(^-|^git\+|^https?://)" requirements.txt; then
echo "Potentially unsafe dependencies detected"
exit 1
fi
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
# Install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
python -m pip install -e .
python -m pip install pytest
# Run test
- name: Run tests
run: |
python -m pytest
# Build Project
- name: Build project
run: |
pip install build
python -m build