diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 6cb1b9d..b897370 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -26,15 +26,31 @@ jobs: - run: shellcheck tests/*.sh - - name: install mkcert + - name: Install mkcert run: |- curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64" chmod +x mkcert-v*-linux-amd64 sudo cp mkcert-v*-linux-amd64 /usr/local/bin/mkcert - - name: start islandora-starter-site + - name: Start islandora-starter-site run: ./tests/init-template-starter.sh + - name: Collect logs for each service + if: ${{ always() }} + run: | + mkdir -p logs + services=$(docker compose --profile dev config --services) + for service in $services; do + docker compose --profile dev logs $service > "logs/${service}.log" + done + + - name: Upload logs as artifacts + if: ${{ always() }} + uses: actions/upload-artifact@v3 + with: + name: docker-logs + path: logs/*.log + - name: Notify Slack on nightly test failure if: failure() && github.event_name == 'schedule' run: |- @@ -42,4 +58,4 @@ jobs: "text": "🚨 Scheduled job failed! Click to view the run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}", }' env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file