-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (32 loc) · 976 Bytes
/
validate-code.yml
File metadata and controls
39 lines (32 loc) · 976 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Validate Code
on:
pull_request:
branches:
- main
workflow_dispatch:
jobs:
validate:
name: Validate Code
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get Minimum Python Version
id: python-version
run: |
min_version=$(grep requires-python pyproject.toml | grep -Eo [0-9]+.[0-9]+)
if [ -z $min_version ]; then
echo "Failed to parse version from pyproject.toml"
exit 1
fi
echo "minimum=$min_version" >> $GITHUB_OUTPUT
- name: Set up Python ${{ steps.python-version.outputs.minimum }}
uses: actions/setup-python@v5
with:
python-version: ${{ steps.python-version.outputs.minimum }}
- name: Install Validate Dependencies
run: pip install -r requirements_dev.txt
- name: Validate
run: make validate
- name: Unit Tests
run: make test