mirror of
https://github.com/Cian-H/invenio-config-iform.git
synced 2025-12-22 21:11:57 +00:00
Another fix attempt
This commit is contained in:
26
.github/workflows/tests.yml
vendored
26
.github/workflows/tests.yml
vendored
@@ -37,20 +37,20 @@ jobs:
|
|||||||
"SEARCH_EXTRAS": "opensearch2"
|
"SEARCH_EXTRAS": "opensearch2"
|
||||||
}]' | jq -c .)
|
}]' | jq -c .)
|
||||||
PYTHON_VERSIONS=$(
|
PYTHON_VERSIONS=$(
|
||||||
grep "Programming Language :: Python ::" setup.cfg |
|
grep "Programming Language :: Python ::" pyproject.toml |
|
||||||
sed -E "s/^.*::\s(.*)$/\1/" |
|
sed -E "s/^.*::\s(.*)$/\1/" |
|
||||||
tr "\n" " " |
|
tr "\n" " " |
|
||||||
xargs |
|
xargs |
|
||||||
sed -E -e 's/\s/","/g' -e 's/^/["/' -e 's/$/"]/')
|
sed -E -e 's/\s/","/g' -e 's/^/["/' -e 's/$/"]/')
|
||||||
DB=$(
|
DB=$(
|
||||||
if grep -q "invenio-db" setup.cfg
|
if grep -q "invenio-db" pyproject.toml
|
||||||
then
|
then
|
||||||
echo '"db-services": ["postgresql14"], '
|
echo '"db-services": ["postgresql14"], '
|
||||||
else
|
else
|
||||||
echo ''
|
echo ''
|
||||||
fi)
|
fi)
|
||||||
SEARCH=$(
|
SEARCH=$(
|
||||||
if grep -q "invenio-search" setup.cfg
|
if grep -q "invenio-search" pyproject.toml
|
||||||
then
|
then
|
||||||
echo '"search-services": ["opensearch2"], '
|
echo '"search-services": ["opensearch2"], '
|
||||||
else
|
else
|
||||||
@@ -85,18 +85,16 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: "${{ matrix.python-version }}"
|
python-version: "${{ matrix.python-version }}"
|
||||||
cache: pip
|
cache: pip
|
||||||
cache-dependency-path: setup.cfg
|
cache-dependency-path: |
|
||||||
|
pyproject.toml
|
||||||
|
|
||||||
- name: Set up uv
|
- name: Set up uv
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v6
|
||||||
with:
|
with:
|
||||||
python-version: "${{ matrix.python-version }}"
|
python-version: "${{ matrix.python-version }}"
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
activate-environment: true
|
|
||||||
cache-dependency-glob: |
|
cache-dependency-glob: |
|
||||||
**/setup.cfg
|
pyproject.toml
|
||||||
**/pyproject.toml
|
|
||||||
**/requirements*.txt
|
|
||||||
cache-suffix: ${{ matrix.python-version }}-${{ matrix.db-service || 'nodb' }}-${{ matrix.search-service || 'nosearch' }}
|
cache-suffix: ${{ matrix.python-version }}-${{ matrix.db-service || 'nodb' }}-${{ matrix.search-service || 'nosearch' }}
|
||||||
|
|
||||||
- name: Show configuration
|
- name: Show configuration
|
||||||
@@ -108,8 +106,16 @@ jobs:
|
|||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
uv pip install --upgrade --group tests .
|
uv pip install -e ".[tests]"
|
||||||
|
|
||||||
|
# Install additional extras if specified in the matrix
|
||||||
|
if [ -n "${{ matrix.DB_EXTRAS }}" ]; then
|
||||||
|
uv pip install -e ".[${{ matrix.DB_EXTRAS }}]"
|
||||||
|
fi
|
||||||
|
if [ -n "${{ matrix.SEARCH_EXTRAS }}" ]; then
|
||||||
|
uv pip install -e ".[${{ matrix.SEARCH_EXTRAS }}]"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
uv run ./run-tests.sh
|
./run-tests.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user