Skip to content

🌱 Bump the github-actions group with 3 updates #636

🌱 Bump the github-actions group with 3 updates

🌱 Bump the github-actions group with 3 updates #636

Workflow file for this run

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
env:
UV_VERSION: "0.7.12"
DEFAULT_PY_VERSION: "3.12"
jobs:
Lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: ${{ env.DEFAULT_PY_VERSION }}
- 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
LeftTests:
needs: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: CheckoutLeft
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
repository: cloud-custodian/cloud-custodian
path: custodian
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: ${{ env.DEFAULT_PY_VERSION }}
- name: Set up Terraform
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
with:
terraform_wrapper: false
- name: Set up Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5
with:
go-version: "1.21.5"
cache: true
cache-dependency-path: "gotfparse/go.sum"
- name: Install uv
id: setup-uv-lint
uses: astral-sh/setup-uv@v6
with:
version: ${{ env.UV_VERSION }}
enable-cache: true
activate-environment: true
- name: Install c7n-left
shell: bash
working-directory: custodian/tools/c7n_left
run: |
uv sync --frozen --inexact --active
- name: Install dependencies
run: |
uv pip install -r requirements-dev.txt
- name: Install package
run: |
uv pip install -e .
- name: Run c7n-left tests
working-directory: custodian
run: |
uv run --active pytest tools/c7n_left/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@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: ${{ matrix.python-version }}
- name: Set up Terraform
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
with:
terraform_wrapper: false
- name: Set up Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5
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