Fix previous step #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run testsuite | |
on: push | |
jobs: | |
run-testsuite-vomsaa: | |
name: Run VOMS-AA testsuite | |
strategy: | |
matrix: | |
client: | |
- 7-beta | |
- 7-stable | |
- 9-beta | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
env: | |
ROBOT_OPTIONS: --variable vo1:vo.2 --variable vo1_host:voms-aa.test.example --variable vo1_issuer:'/C=IT/O=IGI/CN=*.test.example' --variable vo2:vo.1 --variable vo2_host:voms.test.example --variable vo2_issuer:'/C=IT/O=IGI/CN=*.test.example' --exclude issue-723 --exclude issue-724 --exclude issue-726 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Start compose | |
run: docker compose --file docker-compose.ci.yml up --detach | |
working-directory: compose | |
env: | |
TS_IMAGE: italiangrid/voms-testsuite:centos${{ matrix.client }} | |
VOMS_IMAGE: italiangrid/voms:centos7-stable | |
- name: Deploy db and voms | |
run: > | |
docker compose --file docker-compose.ci.yml exec -T --workdir /scripts db bash /scripts/populate-db.sh | |
docker compose --file docker-compose.ci.yml exec -T --workdir /scripts voms bash /scripts/setup-and-start-voms.sh | |
working-directory: compose | |
- name: Create artifacts dir | |
if: ${{ always() }} | |
run: | | |
ARTIFACTS_PATH=${HOME}/artifacts | |
echo ARTIFACTS_PATH: ${ARTIFACTS_PATH} | |
# save it in the job environment | |
echo "ARTIFACTS_PATH=${ARTIFACTS_PATH}" >> ${GITHUB_ENV} | |
mkdir -p ${ARTIFACTS_PATH}/logs ${ARTIFACTS_PATH}/java ${ARTIFACTS_PATH}/cpp | |
- name: Enable legacy OpenSSL crypto policies on EL9 | |
if: matrix.client == '9-beta' | |
run: docker compose --file docker-compose.ci.yml exec -T testsuite bash -c "sudo update-crypto-policies --set LEGACY" | |
working-directory: compose | |
- name: Run testsuite for java clients | |
run: docker compose --file docker-compose.ci.yml exec -T -e ROBOT_OPTIONS="${ROBOT_OPTIONS}" testsuite bash /scripts/ci-run-testsuite.sh | |
working-directory: compose | |
continue-on-error: true | |
- name: Collect test report for java clients | |
if: ${{ always() }} | |
run: | | |
docker compose --file docker-compose.ci.yml cp testsuite:/tmp/reports ${ARTIFACTS_PATH}/java | |
docker compose --file docker-compose.ci.yml exec -T testsuite rm -rf /tmp/reports | |
working-directory: compose | |
- name: Run testsuite for cpp clients | |
run: > | |
docker compose --file docker-compose.ci.yml exec -T -u root testsuite bash -c "update-alternatives --set voms-proxy-init /usr/bin/voms-proxy-init2; update-alternatives --set voms-proxy-info /usr/bin/voms-proxy-info2; update-alternatives --set voms-proxy-destroy /usr/bin/voms-proxy-destroy2" | |
docker compose --file docker-compose.ci.yml exec -T -e ROBOT_OPTIONS="${ROBOT_OPTIONS}" testsuite bash /scripts/ci-run-testsuite.sh --variable client_version:2 --include legacy | |
working-directory: compose | |
continue-on-error: true | |
- name: Collect test report for cpp clients | |
if: ${{ always() }} | |
run: docker compose --file docker-compose.ci.yml cp testsuite:/tmp/reports ${ARTIFACTS_PATH}/cpp | |
working-directory: compose | |
- name: Collect logs | |
if: ${{ always() }} | |
run: | | |
docker compose --file docker-compose.ci.yml logs --no-color testsuite > ${ARTIFACTS_PATH}/logs/testsuite.log | |
docker compose --file docker-compose.ci.yml logs --no-color voms > ${ARTIFACTS_PATH}/logs/voms.log | |
working-directory: compose | |
- name: Stop compose | |
if: ${{ always() }} | |
run: docker compose --file docker-compose.ci.yml down --volumes | |
working-directory: compose | |
- name: Upload artifacts | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-report-and-logs_${{ matrix.client }}_voms-aa | |
path: ${{ env.ARTIFACTS_PATH }} | |