Skip to content

Commit

Permalink
Keep logs from integration tests for review. (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelgbanks authored Nov 5, 2024
1 parent 2670352 commit ea9a6e0
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,36 @@ 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: |-
curl -s -o /dev/null -XPOST $SLACK_WEBHOOK_URL -d '{
"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 }}

0 comments on commit ea9a6e0

Please sign in to comment.