Skip to content

Commit

Permalink
Create test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
joecorall committed Apr 18, 2024
1 parent 5f80bdd commit 37ca111
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Test
on:
push:
paths-ignore:
- '**/*.md'
schedule:
# UTC
- cron: '15 12 * * *'
jobs:
make:
permissions:
contents: read
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set 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
C:\Program Files\Git\bin\bash.exe ./build/scripts/generate-secrets.sh yes
- name: init secrets
if: matrix.os != 'windows-latest'
run: ./build/scripts/generate-secrets.sh yes
shell: bash

- name: make starter
run: make starter
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
- name: make build
run: make build
shell: bash

- name: make production
run: make production
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

0 comments on commit 37ca111

Please sign in to comment.