Skip to content

Commit

Permalink
Use a ref attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Aug 15, 2023
1 parent 810a730 commit 73cb493
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
name: "\
${{ matrix.session }}
${{ matrix.python-version }}\
${{ matrix.session == 'integration' && format(' / integration with {0}', matrix.image_tag || matrix.limesurvey_version) || '' }}\
${{ matrix.session == 'integration' && format(' / integration with {0}', matrix.image_tag || matrix.ref) || '' }}\
${{ matrix.session == 'integration' && format(' / {0}', matrix.database) || '' }}
/ ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -93,38 +93,44 @@ jobs:
os: "ubuntu-latest"
session: "integration"
image_tag: "5-apache"
limesurvey_version: "5-apache"
database: postgres

- python-version: "3.11"
os: "ubuntu-latest"
session: "integration"
image_tag: "6-apache"
limesurvey_version: "6-apache"
database: postgres
experimental: true

- python-version: "3.11"
os: "ubuntu-latest"
session: "integration"
image_tag: "6.2.0-230732-apache"
limesurvey_version: "6-apache"
database: postgres

- python-version: "3.11"
os: "ubuntu-latest"
session: "integration"
image_tag: "6-apache"
experimental: true
limesurvey_version: "6-apache"
database: mysql
experimental: true

- python-version: "3.11"
os: "ubuntu-latest"
session: "integration"
ref: develop
limesurvey_version: "develop"
database: postgres
experimental: true

- python-version: "3.11"
os: "ubuntu-latest"
session: "integration"
ref: master
limesurvey_version: "master"
database: postgres
experimental: true
Expand All @@ -133,6 +139,7 @@ jobs:
os: "ubuntu-latest"
session: "integration"
image_tag: "6-apache"
limesurvey_version: "6-apache"
database: postgres

- python-version: "3.11"
Expand Down Expand Up @@ -189,9 +196,9 @@ jobs:
nox --version
- name: Download LimeSurvey archive
if: ${{ matrix.session == 'integration' && matrix.limesurvey_version }}
if: ${{ matrix.session == 'integration' && matrix.ref }}
run: |
wget https://github.com/LimeSurvey/LimeSurvey/archive/${{ matrix.limesurvey_version }}.tar.gz -O ls.tar.gz -nv
wget https://github.com/LimeSurvey/LimeSurvey/archive/${{ matrix.ref }}.tar.gz -O ls.tar.gz -nv
echo "LS_CHECKSUM=$(sha256sum ls.tar.gz | cut -d' ' -f1)" >> $GITHUB_ENV
- name: Set up Docker Buildx
Expand All @@ -210,10 +217,10 @@ jobs:
LS_IMAGE_TAG: ${{ matrix.image_tag }}
LS_DOCKERFILE_CONTEXT: https://github.com/martialblog/docker-limesurvey.git#master:5.0/apache
LS_DOCKERFILE: Dockerfile
LS_VERSION: ${{ matrix.limesurvey_version }}
LS_VERSION: ${{ matrix.ref }}
COMPOSE_FILE: "\
docker-compose.yml\
${{ matrix.limesurvey_version && ':docker-compose.ref.yml' }}\
${{ matrix.ref && ':docker-compose.ref.yml' }}\
${{ matrix.database == 'mysql' && ':docker-compose.mysql.yml' || '' }}"
run: |
docker compose up -d --wait --quiet-pull
Expand All @@ -225,7 +232,7 @@ jobs:
env:
BACKEND: ${{ matrix.database }}
LS_URL: http://localhost:${{ env.LS_PORT }}/index.php/admin/remotecontrol
LS_VERSION: ${{ matrix.image_tag || matrix.limesurvey_version }}
LS_VERSION: ${{ matrix.limesurvey_version }}
run: |
nox
Expand All @@ -242,10 +249,10 @@ jobs:
id: badge
uses: emibcn/[email protected]
with:
label: LimeSurvey Integration (${{ matrix.image_tag || matrix.limesurvey_version }})
label: LimeSurvey Integration (${{ matrix.image_tag || matrix.ref }}, ${{ matrix.database }})
status: ${{ steps.nox.outcome }}
color: ${{ steps.nox.outcome == 'success' && 'green' || 'red' }}
path: .github/badges/integration-${{ matrix.image_tag || matrix.limesurvey_version }}.svg
path: .github/badges/integration-${{ matrix.image_tag || matrix.ref }}-${{ matrix.database }}.svg

- name: Upload badges
if: always() && steps.badge.outcome == 'success'
Expand Down

0 comments on commit 73cb493

Please sign in to comment.