From 39675b7111ffe431a37a9b84dc78a730f645f67e Mon Sep 17 00:00:00 2001 From: Jirka Borovec <6035284+Borda@users.noreply.github.com> Date: Tue, 15 Oct 2024 21:36:59 +0200 Subject: [PATCH] ci: enable custom env. vars in pkg check (#317) --- .github/workflows/check-package.yml | 10 ++++++++++ .pre-commit-config.yaml | 2 +- CHANGELOG.md | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-package.yml b/.github/workflows/check-package.yml index 330001cd..269e6d55 100644 --- a/.github/workflows/check-package.yml +++ b/.github/workflows/check-package.yml @@ -49,6 +49,14 @@ on: "os": ["ubuntu-20.04", "macos-11", "windows-2022"], "python-version": ["3.8", "3.9"] } + env-vars: + description: "custom environment variables in json format" + required: false + type: string + default: | + { + "SAMPLE_ENV_VARIABLE": 1, + } defaults: run: @@ -73,6 +81,7 @@ jobs: pkg-build: needs: init-store runs-on: ${{ matrix.os }} + env: ${{ fromJSON(inputs.env-vars) }} strategy: max-parallel: 1 # run sequential to prevent download/upload collisions fail-fast: false @@ -104,6 +113,7 @@ jobs: pkg-check: needs: pkg-build runs-on: ${{ matrix.os }} + env: ${{ fromJSON(inputs.env-vars) }} strategy: fail-fast: false matrix: ${{ fromJSON(inputs.testing-matrix) }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 70de0e35..31140461 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,7 +29,7 @@ repos: #args: ["--write-changes"] # uncomment if you want to get automatic fixing - repo: https://github.com/PyCQA/docformatter - rev: v1.7.5 + rev: 06907d0267368b49b9180eed423fae5697c1e909 # todo: fix for docformatter after last 1.7.5 hooks: - id: docformatter additional_dependencies: [tomli] diff --git a/CHANGELOG.md b/CHANGELOG.md index d5cab807..a357fd0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed -- +- CI: enable custom env. vars in pkg check workflow ([#317](https://github.com/Lightning-AI/utilities/pull/317)) ### Fixed