-
Notifications
You must be signed in to change notification settings - Fork 123
CI and development environment overhaul #2298
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,3 @@ | ||
| * text=auto | ||
| # GitHub syntax highlighting | ||
| pixi.lock linguist-language=YAML |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,20 @@ | ||
| name: Build Gallery | ||
|
|
||
| on: | ||
| pull_request: | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| Test-MSS-docs: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| container: | ||
| image: openmss/testing-develop | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: prefix-dev/[email protected] | ||
| with: | ||
| pixi-version: latest | ||
| cache: true | ||
| environments: dev | ||
| - name: Create gallery | ||
| timeout-minutes: 5 | ||
| run: | | ||
| cd docs | ||
| mamba run --no-capture-output -n mssenv python conf.py | ||
| pixi run -e dev python conf.py |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,30 +18,26 @@ jobs: | |
| timeout-minutes: 10 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python 3 | ||
| uses: actions/setup-python@v5 | ||
| - uses: prefix-dev/[email protected] | ||
| with: | ||
| python-version: "3.x" | ||
| pixi-version: latest | ||
| cache: true | ||
| environments: dev | ||
| - name: Lint with codespell | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install codespell | ||
| git ls-files -z | xargs -0 codespell --check-filenames | ||
| run: git ls-files -z | xargs -0 pixi run -e dev codespell --check-filenames | ||
|
|
||
| flake8: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python 3.10 | ||
| uses: actions/setup-python@v5 | ||
| - uses: prefix-dev/[email protected] | ||
| with: | ||
| python-version: "3.10" | ||
| pixi-version: latest | ||
| cache: true | ||
| environments: dev | ||
| - name: Lint with flake8 | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install flake8 flake8-builtins | ||
| git ls-files -z '**.py' | xargs -0 flake8 | ||
| run: git ls-files -z '**.py' | xargs -0 pixi run -e dev flake8 | ||
|
|
||
| no-crlf-in-git: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,27 +21,11 @@ jobs: | |
| os: ["macos-13", "macos-14", "ubuntu-latest"] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Build requirements.txt file | ||
| run: | | ||
| sed -n '/^requirements:/,/^test:/p' localbuild/meta.yaml | | ||
| sed -e "s/.*- //" | | ||
| sed -e "s/menuinst.*//" | | ||
| sed -e "s/.*://" > requirements.tmp.txt | ||
| cat requirements.d/development.txt >> requirements.tmp.txt | ||
| echo "pytest-randomly" >> requirements.tmp.txt | ||
| sed -e '/^$/d' -e '/^#.*$/d' -e 's/\s*# \[not win\]$//' requirements.tmp.txt > requirements.txt | ||
| rm requirements.tmp.txt | ||
| cat requirements.txt | ||
| - name: Get current year and calendar week | ||
| id: year-and-week | ||
| run: echo "year-and-week=$(date +%Y-%V)" >> "$GITHUB_OUTPUT" | ||
| - uses: mamba-org/setup-micromamba@v2 | ||
| - uses: prefix-dev/[email protected] | ||
| with: | ||
| environment-file: requirements.txt | ||
| environment-name: ci | ||
| cache-environment: true | ||
| # Set the cache key in a way that the cache is invalidated every week on monday | ||
| cache-environment-key: environment-${{ steps.year-and-week.outputs.year-and-week }} | ||
| pixi-version: latest | ||
| cache: true | ||
| environments: dev | ||
| - name: Run tests | ||
| timeout-minutes: 40 | ||
| run: micromamba run -n ci env QT_QPA_PLATFORM=offscreen pytest -v -n logical --durations=20 --cov=mslib tests | ||
| run: pixi run -e dev env QT_QPA_PLATFORM=offscreen pytest -v -n logical --durations=20 --cov=mslib tests | ||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| name: Update pixi lockfile | ||
|
|
||
| on: | ||
| schedule: | ||
| # At 04:00 on Monday | ||
| - cron: "0 4 * * 1" | ||
| # ...or manually | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| pixi-update: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| base_branch: ["develop", "stable"] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ matrix.base_branch }} | ||
| - name: Generate new lockfile | ||
| uses: prefix-dev/[email protected] | ||
| with: | ||
| pixi-version: latest | ||
| run-install: false | ||
| - name: Update pixi lockfile | ||
| run: | | ||
| set -o pipefail | ||
| pixi update --json | pixi exec pixi-diff-to-markdown >> diff.md | ||
| - name: Create or update pull request | ||
| uses: peter-evans/create-pull-request@v7 | ||
| with: | ||
| token: ${{ secrets.PAT }} | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is assuming that the currently-configured PAT has the right permissions to create a PR against this repository.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok, I updated it on some places, end of year, we will see. |
||
| branch: automation/update-pixi-lockfile | ||
| delete-branch: true | ||
| add-paths: pixi.lock | ||
| commit-message: Update pixi lockfile | ||
| title: Update pixi lockfile | ||
| body-path: diff.md | ||
Uh oh!
There was an error while loading. Please reload this page.