From 53d64b49e9c3f4352a9c16508891da9ed4d74a82 Mon Sep 17 00:00:00 2001 From: Heinz-Alexander Fuetterer Date: Fri, 1 Dec 2023 19:01:22 +0100 Subject: [PATCH 1/9] version --- rdmo/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rdmo/__init__.py b/rdmo/__init__.py index 5e8b7ade92..0309ae290b 100644 --- a/rdmo/__init__.py +++ b/rdmo/__init__.py @@ -1 +1 @@ -VERSION = __version__ = "2.0.2" +__version__ = "2.0.2" From 6267d3afa60cc486c54f2f407a3d63590c3169a4 Mon Sep 17 00:00:00 2001 From: Heinz-Alexander Fuetterer Date: Fri, 1 Dec 2023 19:13:21 +0100 Subject: [PATCH 2/9] ci --- .github/workflows/ci.yml | 179 ++++++++++++++++++++------------------- 1 file changed, 91 insertions(+), 88 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4a32403ffd..0915e141d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,89 +27,89 @@ env: jobs: - lint: - name: Lint - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 - with: - python-version: "3.12" - cache: pip - - run: python -m pip install --upgrade pip setuptools wheel - - run: python -m pip install -e .[dev] - - name: Set up pre-commit cache - uses: actions/cache@v3 - with: - path: ~/.cache/pre-commit - key: lint-${{ hashFiles('.pre-commit-config.yaml') }} - - name: Run linters via pre-commit (ruff, eslint) - run: pre-commit run --all-files --color=always +# lint: +# name: Lint +# runs-on: ubuntu-22.04 +# steps: +# - uses: actions/checkout@v4 +# - uses: actions/setup-python@v4 +# with: +# python-version: "3.12" +# cache: pip +# - run: python -m pip install --upgrade pip setuptools wheel +# - run: python -m pip install -e .[dev] +# - name: Set up pre-commit cache +# uses: actions/cache@v3 +# with: +# path: ~/.cache/pre-commit +# key: lint-${{ hashFiles('.pre-commit-config.yaml') }} +# - name: Run linters via pre-commit (ruff, eslint) +# run: pre-commit run --all-files --color=always - test: - runs-on: ubuntu-22.04 - strategy: - matrix: - python-version: ['3.8', '3.12'] - db-backend: [mysql, postgres] - name: "Test (Python: ${{ matrix.python-version }}, DB: ${{ matrix.db-backend }})" - needs: lint - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - cache: pip - - name: Install Dependencies - run: | - sudo apt update - sudo apt install --yes pandoc texlive-xetex librsvg2-bin - python -m pip install --upgrade pip setuptools wheel - pandoc --version - - name: Install rdmo[mysql] and start mysql - run: | - python -m pip install -e .[ci,mysql] - sudo systemctl start mysql.service - if: matrix.db-backend == 'mysql' - - name: Install rdmo[postgres] and start postgresql - run: | - python -m pip install -e .[ci,postgres] - sudo systemctl start postgresql.service - pg_isready - sudo -u postgres psql --command="CREATE USER postgres_user PASSWORD 'postgres_password' CREATEDB" - if: matrix.db-backend == 'postgres' - - name: Prepare Env - run: | - cp -r testing/media testing/media_root - mkdir testing/log - - name: Run Tests - run: | - pytest -p randomly -p no:cacheprovider --cov --reuse-db --numprocesses=auto --dist=loadscope - coveralls --service=github - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GITHUB_DB_BACKEND: ${{ matrix.db-backend }} - COVERALLS_FLAG_NAME: '${{ matrix.db-backend }}: ${{ matrix.python-version }}' - COVERALLS_PARALLEL: true - # end-to-end tests - - uses: actions/setup-node@v4 - with: - node-version: 18 - cache: npm - if: matrix.python-version == '3.12' && matrix.db-backend == 'postgres' - - name: Install e2e tests dependencies - run: | - npm install - npm run build:prod - playwright install chromium - if: matrix.python-version == '3.12' && matrix.db-backend == 'postgres' - - name: Run end-to-end tests - run: pytest -p randomly -p no:cacheprovider --reuse-db --numprocesses=auto --dist=loadscope -m e2e --nomigrations - if: matrix.python-version == '3.12' && matrix.db-backend == 'postgres' - env: - DJANGO_DEBUG: True - GITHUB_DB_BACKEND: ${{ matrix.db-backend }} +# test: +# runs-on: ubuntu-22.04 +# strategy: +# matrix: +# python-version: ['3.8', '3.12'] +# db-backend: [mysql, postgres] +# name: "Test (Python: ${{ matrix.python-version }}, DB: ${{ matrix.db-backend }})" +# needs: lint +# steps: +# - uses: actions/checkout@v4 +# - name: Set up Python ${{ matrix.python-version }} +# uses: actions/setup-python@v4 +# with: +# python-version: ${{ matrix.python-version }} +# cache: pip +# - name: Install Dependencies +# run: | +# sudo apt update +# sudo apt install --yes pandoc texlive-xetex librsvg2-bin +# python -m pip install --upgrade pip setuptools wheel +# pandoc --version +# - name: Install rdmo[mysql] and start mysql +# run: | +# python -m pip install -e .[ci,mysql] +# sudo systemctl start mysql.service +# if: matrix.db-backend == 'mysql' +# - name: Install rdmo[postgres] and start postgresql +# run: | +# python -m pip install -e .[ci,postgres] +# sudo systemctl start postgresql.service +# pg_isready +# sudo -u postgres psql --command="CREATE USER postgres_user PASSWORD 'postgres_password' CREATEDB" +# if: matrix.db-backend == 'postgres' +# - name: Prepare Env +# run: | +# cp -r testing/media testing/media_root +# mkdir testing/log +# - name: Run Tests +# run: | +# pytest -p randomly -p no:cacheprovider --cov --reuse-db --numprocesses=auto --dist=loadscope +# coveralls --service=github +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# GITHUB_DB_BACKEND: ${{ matrix.db-backend }} +# COVERALLS_FLAG_NAME: '${{ matrix.db-backend }}: ${{ matrix.python-version }}' +# COVERALLS_PARALLEL: true +# # end-to-end tests +# - uses: actions/setup-node@v4 +# with: +# node-version: 18 +# cache: npm +# if: matrix.python-version == '3.12' && matrix.db-backend == 'postgres' +# - name: Install e2e tests dependencies +# run: | +# npm install +# npm run build:prod +# playwright install chromium +# if: matrix.python-version == '3.12' && matrix.db-backend == 'postgres' +# - name: Run end-to-end tests +# run: pytest -p randomly -p no:cacheprovider --reuse-db --numprocesses=auto --dist=loadscope -m e2e --nomigrations +# if: matrix.python-version == '3.12' && matrix.db-backend == 'postgres' +# env: +# DJANGO_DEBUG: True +# GITHUB_DB_BACKEND: ${{ matrix.db-backend }} coveralls: name: Indicate completion to coveralls @@ -126,11 +126,19 @@ jobs: build-wheel: name: Build python wheel - needs: test + # needs: test runs-on: ubuntu-22.04 if: github.event_name == 'pull_request' steps: - uses: actions/checkout@v4 + - name: Get short commit SHA + id: short-sha + run: echo "sha=$(git rev-parse --short $GITHUB_SHA)" >> $GITHUB_OUTPUT + + - run: echo "The current short commit SHA is ${{ steps.short-sha.outputs.sha }}" + + - run: cat rdmo/__init__.py + - uses: actions/setup-node@v4 with: node-version: 18 @@ -143,11 +151,6 @@ jobs: cache: pip - run: python -m pip install --upgrade build pip setuptools wheel - run: python -m build --wheel - - run: | - PR_NUMBER=${{ github.event.pull_request.number }} - WHL_FILE=$(ls dist/*.whl) - NEW_NAME="${WHL_FILE/-py3-none-any/dev${PR_NUMBER}-py3-none-any}" - mv "$WHL_FILE" "$NEW_NAME" - uses: actions/upload-artifact@v3 with: name: wheel From 281670e71a3f59584df496570ac5439164da241f Mon Sep 17 00:00:00 2001 From: Heinz-Alexander Fuetterer Date: Fri, 1 Dec 2023 19:13:49 +0100 Subject: [PATCH 3/9] ci --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0915e141d8..cecbfae253 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -137,7 +137,7 @@ jobs: - run: echo "The current short commit SHA is ${{ steps.short-sha.outputs.sha }}" - - run: cat rdmo/__init__.py + - run: cat rdmo/__init__.py - uses: actions/setup-node@v4 with: From 41c6971f36bda65f9bff4941c87ad42781458a7b Mon Sep 17 00:00:00 2001 From: Heinz-Alexander Fuetterer Date: Fri, 1 Dec 2023 19:15:44 +0100 Subject: [PATCH 4/9] ci --- .github/workflows/ci.yml | 52 ++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cecbfae253..2dbcd59ebf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -111,18 +111,18 @@ jobs: # DJANGO_DEBUG: True # GITHUB_DB_BACKEND: ${{ matrix.db-backend }} - coveralls: - name: Indicate completion to coveralls - needs: test - runs-on: ubuntu-latest - container: python:3-slim - steps: - - name: Run Coveralls finish - run: | - python -m pip install coveralls - coveralls --service=github --finish - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # coveralls: + # name: Indicate completion to coveralls + # needs: test + # runs-on: ubuntu-latest + # container: python:3-slim + # steps: + # - name: Run Coveralls finish + # run: | + # python -m pip install coveralls + # coveralls --service=github --finish + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} build-wheel: name: Build python wheel @@ -190,17 +190,17 @@ jobs: - run: python -m pip freeze - run: python -m pip list --outdated - required-checks-pass: - if: always() - needs: - - lint - - test - - coveralls - - build-wheel - - dev-setup - - optional-dependencies - runs-on: ubuntu-22.04 - steps: - - uses: re-actors/alls-green@release/v1 - with: - jobs: ${{ toJSON(needs) }} + # required-checks-pass: + # if: always() + # needs: + # - lint + # - test + # - coveralls + # - build-wheel + # - dev-setup + # - optional-dependencies + # runs-on: ubuntu-22.04 + # steps: + # - uses: re-actors/alls-green@release/v1 + # with: + # jobs: ${{ toJSON(needs) }} From 9d3f4737cc83a3ed191fb0eca2aff49b0a419823 Mon Sep 17 00:00:00 2001 From: Heinz-Alexander Fuetterer Date: Fri, 1 Dec 2023 19:24:08 +0100 Subject: [PATCH 5/9] ci --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2dbcd59ebf..f8203a178b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -137,6 +137,12 @@ jobs: - run: echo "The current short commit SHA is ${{ steps.short-sha.outputs.sha }}" + - name: Get current version (MAJOR.MINOR.PATCH) + id: current-version + run: echo "current_version=$(grep -Po "[\d.]+" rdmo/__init__.py)" >> $GITHUB_OUTPUT + + - run: echo "The current version is ${{ steps.current-version.outputs.current_version }}" + - run: cat rdmo/__init__.py - uses: actions/setup-node@v4 From fce893addb66706b68b887a9031e91c681a42052 Mon Sep 17 00:00:00 2001 From: Heinz-Alexander Fuetterer Date: Fri, 1 Dec 2023 19:32:30 +0100 Subject: [PATCH 6/9] ci --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8203a178b..078d04f4b1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -143,6 +143,11 @@ jobs: - run: echo "The current version is ${{ steps.current-version.outputs.current_version }}" + - name: Update version + run: | + NEW_VERSION="${{ steps.current-version.outputs.current_version }}.dev${{ steps.short-sha.outputs.sha }}" + sed -i "s/__version__ = .*/__version__ = \"$NEW_VERSION\"/" rdmo/__init__.py + - run: cat rdmo/__init__.py - uses: actions/setup-node@v4 From 2408ecb73d2c925b5dbf419096ec245ecd2b6f5c Mon Sep 17 00:00:00 2001 From: Heinz-Alexander Fuetterer Date: Fri, 1 Dec 2023 19:37:03 +0100 Subject: [PATCH 7/9] ci --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 078d04f4b1..5ec7c19614 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -145,7 +145,7 @@ jobs: - name: Update version run: | - NEW_VERSION="${{ steps.current-version.outputs.current_version }}.dev${{ steps.short-sha.outputs.sha }}" + NEW_VERSION="${{ steps.current-version.outputs.current_version }}dev${{ steps.short-sha.outputs.sha }}" sed -i "s/__version__ = .*/__version__ = \"$NEW_VERSION\"/" rdmo/__init__.py - run: cat rdmo/__init__.py From 15a26436234db6c87c10675d07d9bd69a342d35a Mon Sep 17 00:00:00 2001 From: Heinz-Alexander Fuetterer Date: Fri, 1 Dec 2023 19:41:11 +0100 Subject: [PATCH 8/9] ci --- .github/workflows/ci.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5ec7c19614..9d63195415 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -134,15 +134,9 @@ jobs: - name: Get short commit SHA id: short-sha run: echo "sha=$(git rev-parse --short $GITHUB_SHA)" >> $GITHUB_OUTPUT - - - run: echo "The current short commit SHA is ${{ steps.short-sha.outputs.sha }}" - - name: Get current version (MAJOR.MINOR.PATCH) id: current-version run: echo "current_version=$(grep -Po "[\d.]+" rdmo/__init__.py)" >> $GITHUB_OUTPUT - - - run: echo "The current version is ${{ steps.current-version.outputs.current_version }}" - - name: Update version run: | NEW_VERSION="${{ steps.current-version.outputs.current_version }}dev${{ steps.short-sha.outputs.sha }}" @@ -161,6 +155,7 @@ jobs: python-version: '3.12' cache: pip - run: python -m pip install --upgrade build pip setuptools wheel + - run: python -m pip list - run: python -m build --wheel - uses: actions/upload-artifact@v3 with: From e59b520400ff1c67c20babf9686f9815970f5b48 Mon Sep 17 00:00:00 2001 From: Heinz-Alexander Fuetterer Date: Sat, 2 Dec 2023 08:37:53 +0100 Subject: [PATCH 9/9] ci --- .github/workflows/ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d63195415..74a97fbf66 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -139,11 +139,9 @@ jobs: run: echo "current_version=$(grep -Po "[\d.]+" rdmo/__init__.py)" >> $GITHUB_OUTPUT - name: Update version run: | - NEW_VERSION="${{ steps.current-version.outputs.current_version }}dev${{ steps.short-sha.outputs.sha }}" + NEW_VERSION="${{ steps.current-version.outputs.current_version }}.dev0+${{ steps.short-sha.outputs.sha }}" sed -i "s/__version__ = .*/__version__ = \"$NEW_VERSION\"/" rdmo/__init__.py - - run: cat rdmo/__init__.py - - uses: actions/setup-node@v4 with: node-version: 18