releng - 🌱 Bump the python-requirements group across 1 direc… #520
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
inputs: {} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
Lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 | |
- name: Set up Python | |
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d | |
with: | |
python-version: "3.13" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements-dev.txt | |
- name: Black | |
run: | | |
black --check tfparse tests | |
- name: Flake8 | |
run: | | |
flake8 tfparse tests | |
Tests: | |
needs: Lint | |
runs-on: ${{ matrix.runner }} | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11", "3.12", "3.13"] | |
runner: ["ubuntu-latest", "windows-latest", "macos-latest"] | |
exclude: | |
# just conserving runners by excluding older versions | |
- runner: macos-latest | |
python-version: 3.10 | |
- runner: windows-latest | |
python-version: 3.10 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up Terraform | |
uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36 | |
with: | |
terraform_wrapper: false | |
- name: Set up Go | |
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 | |
with: | |
go-version: "1.21.5" | |
cache: true | |
cache-dependency-path: "gotfparse/go.sum" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements-dev.txt | |
- name: Install package | |
run: | | |
pip install -e . | |
- name: Test with pytest for Python ${{ matrix.python-version }} | |
run: | | |
pytest tests |