From d9b4d4a781815fbffb00f2ae2029d40329fa893a Mon Sep 17 00:00:00 2001 From: Kevin DeJong Date: Thu, 31 Aug 2023 09:33:59 -0700 Subject: [PATCH] Update github workflow --- .../workflows/packages-cfn_guard_rs-CI.yml | 54 ++----------------- packages/cfn_guard_rs/Cargo.toml | 3 -- packages/cfn_guard_rs/pyproject.toml | 3 ++ packages/cfn_guard_rs_hook/pyproject.toml | 2 +- 4 files changed, 9 insertions(+), 53 deletions(-) diff --git a/.github/workflows/packages-cfn_guard_rs-CI.yml b/.github/workflows/packages-cfn_guard_rs-CI.yml index 8e87d0c4..e3953605 100644 --- a/.github/workflows/packages-cfn_guard_rs-CI.yml +++ b/.github/workflows/packages-cfn_guard_rs-CI.yml @@ -12,14 +12,16 @@ on: - "packages/cfn_guard_rs/**" - "packages/cfn_guard_rs_hook/**" jobs: - linux: + unitlint: strategy: matrix: + os: [ubuntu-latest, macos-latest, windows-latest] target: [aarch64, x86_64] + python: [ 3.8, 3.9, "3.10", "3.11" ] directory: - ./packages/cfn_guard_rs - ./packages/cfn_guard_rs_hook - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} defaults: run: working-directory: ${{ matrix.directory }} @@ -28,53 +30,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v1 with: - python-version: "3.8" - - name: Install Tox and any other packages - run: pip3 install tox - - name: Run Tox - run: | - python3 --version - tox -e py - - windows: - strategy: - matrix: - directory: - - ./packages/cfn_guard_rs - - ./packages/cfn_guard_rs_hook - runs-on: windows-latest - defaults: - run: - working-directory: ${{ matrix.directory }} - steps: - - uses: actions/checkout@v3 - - name: Setup Python - uses: actions/setup-python@v1 - with: - python-version: "3.8" - - name: Install Tox and any other packages - run: pip3 install tox - - name: Run Tox - run: | - python3 --version - tox -e py - - macos: - strategy: - matrix: - directory: - - ./packages/cfn_guard_rs - - ./packages/cfn_guard_rs_hook - runs-on: macos-latest - defaults: - run: - working-directory: ${{ matrix.directory }} - steps: - - uses: actions/checkout@v3 - - name: Setup Python - uses: actions/setup-python@v1 - with: - python-version: "3.8" + python-version: ${{ matrix.python }} - name: Install Tox and any other packages run: pip3 install tox - name: Run Tox diff --git a/packages/cfn_guard_rs/Cargo.toml b/packages/cfn_guard_rs/Cargo.toml index a0113c19..9ff745b7 100644 --- a/packages/cfn_guard_rs/Cargo.toml +++ b/packages/cfn_guard_rs/Cargo.toml @@ -8,9 +8,6 @@ edition = "2021" name = "cfn_guard_rs" crate-type = ["cdylib"] -[package.metadata.maturin] -python-source = "python" - [dependencies] pyo3 = { version = "0.19.2", features = ["extension-module"] } cfn-guard = "3.0.0" diff --git a/packages/cfn_guard_rs/pyproject.toml b/packages/cfn_guard_rs/pyproject.toml index a364a283..32765951 100644 --- a/packages/cfn_guard_rs/pyproject.toml +++ b/packages/cfn_guard_rs/pyproject.toml @@ -2,6 +2,9 @@ requires = ["maturin>=0.13,<0.14"] build-backend = "maturin" +[tool.maturin] +python-source = "python" + [project] name = "cfn_guard_rs" requires-python = ">=3.7" diff --git a/packages/cfn_guard_rs_hook/pyproject.toml b/packages/cfn_guard_rs_hook/pyproject.toml index 22ab0e06..2c1c0b62 100644 --- a/packages/cfn_guard_rs_hook/pyproject.toml +++ b/packages/cfn_guard_rs_hook/pyproject.toml @@ -8,7 +8,7 @@ authors = ["Kevin DeJong "] python = "^3.7.2" cloudformation-cli-python-lib = "^2.1.12" cfn-guard-rs = "^0.2.1" -pyyaml = "~5.4.1" +pyyaml = "~6.0.1" Jinja2 = "^3.0.0" jsonpath-rw = "^1.0.0"