Skip to content

Commit

Permalink
Merge 986b9ef into 8581b6d
Browse files Browse the repository at this point in the history
  • Loading branch information
afuetterer committed May 6, 2024
2 parents 8581b6d + 986b9ef commit d52fdec
Show file tree
Hide file tree
Showing 17 changed files with 1,622 additions and 1,471 deletions.
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ updates:
directory: /
schedule:
interval: monthly
versioning-strategy: increase-if-necessary
open-pull-requests-limit: 10
target-branch: dependency-updates
labels:
Expand All @@ -12,6 +13,8 @@ updates:
- type:maintenance
ignore:
- dependency-name: django-mptt # pinned, 0.15 requires Python >= 3.9
- dependency-name: django
update-types: [ "version-update:semver-major"] # ignore major for django
groups:
# create a single pull request containing all updates for the optional dependencies
optional:
Expand Down Expand Up @@ -58,6 +61,8 @@ updates:
- dependency-name: react-bootstrap # rdmo still uses bootstrap 3, which is not supported by react-bootstrap > 0.33.1
- dependency-name: "*"
update-types: ["version-update:semver-patch"] # ignore patch versions for all JavaScript dependencies
- dependency-name: react-redux
update-types: ["version-update:semver-major"] # ignore major for react-redux
groups:
react:
patterns:
Expand Down
26 changes: 18 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ on:
- conftest.py
- package.json
- pyproject.toml
types:
- opened
- synchronize
- reopened
- ready_for_review # this is needed to trigger checks, when an auto-generated "draft" PR is set for "ready for review".

# Ref: https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
Expand All @@ -32,14 +37,14 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- run: python -m pip install --upgrade pip
- run: python -m pip install --editable .[dev]
- name: Set up pre-commit cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: lint-${{ hashFiles('.pre-commit-config.yaml') }}
Expand All @@ -57,7 +62,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
Expand All @@ -83,6 +88,11 @@ jobs:
run: |
cp -r testing/media testing/media_root
mkdir testing/log
- name: Run package status tests first
run: |
pytest rdmo/core/tests/test_package_status.py::test_package_json_and_pre_commit_versions_match \
--nomigrations --verbose
if: matrix.python-version == '3.12' && matrix.db-backend == 'postgres'
- name: Run Tests
run: |
pytest -p randomly -p no:cacheprovider --cov --reuse-db --numprocesses=auto --dist=loadscope
Expand Down Expand Up @@ -111,7 +121,7 @@ jobs:
env:
DJANGO_DEBUG: True
GITHUB_DB_BACKEND: ${{ matrix.db-backend }}
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: screenshots
path: screenshots/*.png
Expand Down Expand Up @@ -159,7 +169,7 @@ jobs:
cache: npm
- run: npm install
- run: npm run build:prod
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: pip
Expand All @@ -180,7 +190,7 @@ jobs:
python -m pip show rdmo >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
- name: Upload wheel as artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheel
path: dist/rdmo*.whl
Expand All @@ -196,7 +206,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
Expand All @@ -208,7 +218,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/pre-commit-autoupdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
Expand All @@ -37,10 +37,11 @@ jobs:
sed -i -e 's/\]/>/g' updates.log
echo -e "## Proposed changes\n\nBumps the pre-commit config with the following updates:\n" > pr-body.md
cat updates.log >> pr-body.md
echo -e "\n---\nThis PR is auto-generated once a month." >> pr-body.md
echo -e "\nThis PR is auto-generated once a month.\n\n---" >> pr-body.md
echo -e "\n> [!NOTE]\n> Mark this PR as "ready for review" to trigger additional checks." >> pr-body.md
# Ref: https://github.com/peter-evans/create-pull-request
- name: Create pull request
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5
with:
branch: pre-commit-autoupdate
base: dependency-updates
Expand All @@ -53,8 +54,9 @@ jobs:
labels: |
dependencies
pre-commit
type: maintenance
type:maintenance
delete-branch: true
draft: true
- name: Write to job summary
run: |
cat updates.log >> $GITHUB_STEP_SUMMARY
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.1.0
18.20.1
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repos:
exclude: \.dot$
- id: debug-statements
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.6
rev: v0.3.4
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand All @@ -33,5 +33,5 @@ repos:
args: [--fix, --color]
additional_dependencies:
- eslint@8.54.0
- eslint-plugin-react@7.33.2
- eslint-plugin-react@7.34.0
- react@18.2.0
Loading

0 comments on commit d52fdec

Please sign in to comment.