-
Notifications
You must be signed in to change notification settings - Fork 48
Fix/copilot setup steps shares steps with lint and test #1998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Flix6x
merged 8 commits into
main
from
fix/copilot-setup-steps-shares-steps-with-lint-and-test
Mar 4, 2026
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
dc3e507
fix: match matrix variable name
Flix6x 02f1057
style: lowercase secrets is correct GitHub expression syntax
Flix6x c2e848a
fix: setup-test-env.yml uses same composite action as lint-and-test.yml
Flix6x ec478a1
refactor: streamline options formatting
Flix6x e577b5d
fix: move composite actions to dedicated folder
Flix6x 85542ba
fix: ensure cache path exists
Flix6x ff2e1a1
docs: changelog entry
Flix6x bca347f
Fix composite action location and missing checkout in CI workflows (#…
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| # Composite action: installs system dependencies, checks out code, | ||
| # upgrades pip, loads psql extensions and installs FlexMeasures for testing. | ||
| # | ||
| # The caller is responsible for declaring the postgres (and, for the Copilot | ||
| # agent, redis) service container(s) and exporting the PG* / FLEXMEASURES_* | ||
| # environment variables before calling this action. | ||
|
|
||
| name: "Setup FlexMeasures test environment" | ||
| description: > | ||
| Sets up a reproducible Python + PostgreSQL test environment for FlexMeasures. | ||
| Call this from any job that already has a postgres service container running. | ||
|
|
||
| inputs: | ||
| python-version: | ||
| description: "Python version to set up (e.g. '3.11')" | ||
| required: true | ||
| install-mode: | ||
| description: "'pinned' (default) uses pip-sync on locked .txt files; 'latest' upgrades to newest compatible packages" | ||
| required: false | ||
| default: "pinned" | ||
|
|
||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ inputs.python-version }} | ||
|
|
||
| - name: Get history and tags for SCM versioning to work | ||
| shell: bash | ||
| run: | | ||
| git fetch --prune --unshallow || true | ||
| git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
|
|
||
| - name: Upgrade pip | ||
| # Pin due to https://github.com/pypa/pip/issues/13636 | ||
| shell: bash | ||
| run: python -m pip install --upgrade "pip==25.2" | ||
|
|
||
| - name: Install system dependencies | ||
| shell: bash | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get -y install libpq-dev coinor-cbc postgresql-client | ||
|
|
||
| - name: Load PostgreSQL extensions | ||
| shell: bash | ||
| run: | | ||
| psql -h "$PGHOST" -p "$PGPORT" -U "$PGUSER" -d "$PGDB" \ | ||
| -f ci/load-psql-extensions.sql | ||
| env: | ||
| PGPASSWORD: ${{ env.PGPASSWORD }} | ||
|
|
||
| - name: Install FlexMeasures & dependencies | ||
| shell: bash | ||
| run: | | ||
| if [[ "${{ inputs.install-mode }}" == "latest" ]]; then | ||
| make install-for-test pinned=no | ||
| else | ||
| make install-for-test | ||
| fi |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.