Skip to content

Nightly

Nightly #895

Workflow file for this run

name: Nightly
on:
schedule:
- cron: '5 4 * * *'
push:
branches: [ development ]
workflow_dispatch:
jobs:
build:
name: build
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.test-matrix.outputs.matrix }}
env:
DOCKER_USER: ${{secrets.DOCKER_USER}}
steps:
# Check out current commit
- name: Checkout
uses: actions/checkout@v3
# Make sure buildkit is enabled
- name: Enable buildkit
shell: bash
run: |
echo '{"experimental": "enabled"}' > ~/.docker/config.json
# Build and run the static environment
- name: Build Static
run: make static-docker-compose.yml up
# Drush tests
- name: Drush test
run: docker-compose exec -T drupal drush -d status
- name: Export image
run: make static-drupal-image-export
- uses: actions/upload-artifact@v2
with:
name: drupal-image
path: images
- name: Generate Test Matrix
id: test-matrix
uses: jhu-idc/[email protected]
with:
key: suite
glob: '*nightly*.sh'
- name: Notify Slack
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took,pullRequest # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
if: failure()
test:
name: test
runs-on: ubuntu-latest
needs: build
strategy:
matrix: ${{ fromJSON(needs.build.outputs.matrix) }}
fail-fast: false
steps:
# Check out current commit
- name: Checkout
uses: actions/checkout@v3
- name: Download Drupal Image
uses: actions/download-artifact@v2
with:
name: drupal-image
path: images
- name: Load Drupal Image
run: docker load < images/static-drupal.tar
- name: Up
run: make up
- name: test
run: |
mkdir -p end-to-end/reports
chmod a+rwx end-to-end/reports
make test test=${{ matrix.suite }}
- name: reports
if: always()
run: |
mkdir -p end-to-end/reports/${{ matrix.suite }}
docker ps
docker logs idc_drupal_1 2>&1 | tee end-to-end/reports/${{ matrix.suite }}/drupal-${{ matrix.suite }}.log
docker logs idc_alpaca_1 2>&1 | tee end-to-end/reports/${{ matrix.suite }}/alpaca-${{ matrix.suite }}.log
docker logs idc_homarus_1 2>&1 | tee end-to-end/reports/${{ matrix.suite }}/homarus-${{ matrix.suite }}.log
docker logs idc_crayfits_1 2>&1 | tee end-to-end/reports/${{ matrix.suite }}/crayfits-${{ matrix.suite }}.log
docker logs idc_fits_1 2>&1 | tee end-to-end/reports/${{ matrix.suite }}/fits-${{ matrix.suite }}.log
docker logs idc_houdini_1 2>&1 | tee end-to-end/reports/${{ matrix.suite }}/houdini-${{ matrix.suite }}.log
docker logs idc_dlq_1 2>&1 | tee end-to-end/reports/${{ matrix.suite }}/dlq-${{ matrix.suite }}.log
- name: upload reports
if: always()
uses: actions/upload-artifact@v2
with:
name: reports-${{ matrix.suite }}
path: end-to-end/reports/${{ matrix.suite }}
- name: Notify Slack
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took,pullRequest # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
MATRIX_CONTEXT: ${{ toJson(matrix) }} # required
if: failure()