Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nightly tests #411

Merged
merged 2 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 3 additions & 35 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# TODO: someone with more windows chops please add windows test support
# os: [windows-latest, ubuntu-latest, macos-latest]
# TODO: keep an eye when macos-14+ (M1) support is available
os: [ubuntu-latest]
os: [ubuntu-22.04, ubuntu-24.04]
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -28,16 +25,7 @@ jobs:
run: |-
echo "TAG=main" >> $GITHUB_OUTPUT

- name: Setup make and secrets for Windows
if: matrix.os == 'windows-latest'
run: |
choco install mingw -y
echo "C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin" >> $GITHUB_PATH
cp sample.env .env <-- do not know what windows cp. COPY?
C:\Program Files\Git\bin\bash.exe ./build/scripts/check-secrets.sh yes

- name: init secrets
if: matrix.os != 'windows-latest'
run: |-
cp sample.env .env
./build/scripts/check-secrets.sh yes
Expand All @@ -48,17 +36,7 @@ jobs:
shell: bash

- name: check online
# TODO: what's a windows curl?
if: matrix.os != 'windows-latest'
run: |-
STATUS=$(curl -k \
-w '%{http_code}' -o /dev/null \
https://islandora.traefik.me/)
echo "Site check returned ${STATUS}"
if [ ${STATUS} -ne 200 ]; then
echo "Failed to bring up site"
exit 1
fi
run: ./scripts/ci/ping.sh

- name: "Make sure we can export the site config through the UI"
run: ./scripts/ci/drush-cex-ui.sh
Expand All @@ -72,17 +50,7 @@ jobs:
shell: bash

- name: check online
# TODO: what's a windows curl?
if: matrix.os != 'windows-latest'
run: |-
STATUS=$(curl -k \
-w '%{http_code}' -o /dev/null \
https://islandora.traefik.me/)
echo "Site check returned ${STATUS}"
if [ ${STATUS} -ne 200 ]; then
echo "Failed to bring up site"
exit 1
fi
run: ./scripts/ci/ping.sh

- name: Notify Slack on nightly test failure
if: failure() && github.event_name == 'schedule'
Expand Down
18 changes: 18 additions & 0 deletions scripts/ci/ping.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

COUNTER=0
while true; do
HTTP_STATUS=$(curl -w '%{http_code}' -o /dev/null -s https://islandora.traefik.me/)
echo "Ping returned http status ${HTTP_STATUS}, exit code $?"
if [ "${HTTP_STATUS}" -eq 200 ]; then
echo "We're live 🚀"
exit 0
fi

((COUNTER++))
if [ "${COUNTER}" -eq 50 ]; then
echo "Failed to come online after 4m"
exit 1
fi
sleep 5;
done