From 985fef5df4e490f3f141c53f194fb8db538d332c Mon Sep 17 00:00:00 2001 From: Jirka B Date: Tue, 15 Oct 2024 21:24:56 +0200 Subject: [PATCH 1/4] ci: enable custom env. vars in pkg check --- .github/workflows/check-package.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/check-package.yml b/.github/workflows/check-package.yml index 330001cd..a6687ccf 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: | + { + "SPHINX_MOCK_REQUIREMENTS": 0, + } 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) }} From 46029b3f63ef8f8ed73ac925884f16c88d3354ee Mon Sep 17 00:00:00 2001 From: Jirka B Date: Tue, 15 Oct 2024 21:27:18 +0200 Subject: [PATCH 2/4] chlog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 637d799fa1022a0b005a4a68c8fa9b54c2b5bf1e Mon Sep 17 00:00:00 2001 From: Jirka B Date: Tue, 15 Oct 2024 21:28:30 +0200 Subject: [PATCH 3/4] sample --- .github/workflows/check-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-package.yml b/.github/workflows/check-package.yml index a6687ccf..269e6d55 100644 --- a/.github/workflows/check-package.yml +++ b/.github/workflows/check-package.yml @@ -55,7 +55,7 @@ on: type: string default: | { - "SPHINX_MOCK_REQUIREMENTS": 0, + "SAMPLE_ENV_VARIABLE": 1, } defaults: From 37b6371bef501e79d0cacff3a7137c260b7c1338 Mon Sep 17 00:00:00 2001 From: Jirka B Date: Tue, 15 Oct 2024 21:31:36 +0200 Subject: [PATCH 4/4] fix precommit --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]