Test Python Files #16
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
name: Test Python Files | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
push: | |
branches: | |
- master | |
pull_request: | |
types: [opened, synchronize, reopened] | |
branches: | |
- master | |
jobs: | |
run-py: | |
strategy: | |
matrix: | |
py-version: [3.9] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{matrix.py-version}} | |
cache: pip | |
- name: Create, activate virtual environment and Install dependencies | |
run: | | |
python -m venv .venv | |
source .venv/bin/activate | |
python -m pip install -r requirements.txt --upgrade pip | |
echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH | |
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV | |
- name: Run python files | |
run: | | |
source .venv/bin/activate | |
python .ci/scripts.py |