fix(workflow): increase sleep #96
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This workflow builds a xar archive, deploys it into exist and execute a simple smoke test. | |
| name: exist-db CI | |
| on: | |
| push: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # 6.4.0 created | |
| exist-version: [6.2.0, release, latest] | |
| steps: | |
| # Checkout code | |
| - uses: actions/checkout@v6 | |
| # Speed up apt-get installs | |
| - name: Disable man-db to make package install and removal faster | |
| run: | | |
| echo 'set man-db/auto-update false' | sudo debconf-communicate >/dev/null | |
| sudo dpkg-reconfigure man-db | |
| - name: Install Test Dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libxml2-utils bats | |
| # sanity check | |
| - name: Ensure all XML files are well-formed | |
| run: | | |
| xmllint --noout \ | |
| $(find . -type f -name '*.xml') | |
| # Build | |
| - name: Install Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: 22 | |
| - run: ant -Dapp.version=1.0.0 | |
| # For private repos use secret org token | |
| - name: authenticate gh cli | |
| timeout-minutes: 1 | |
| run: gh auth status | |
| - name: Add Expath Dependency | |
| working-directory: build/ | |
| run: | | |
| gh release download -R eeditiones/roaster -p 'roaster-*.xar' -O '_roaster.xar' | |
| - name: Check Contents | |
| working-directory: build/ | |
| run: ls | |
| # Install | |
| - name: Start exist-ci containers | |
| run: | | |
| docker run -dit -p 8080:8080 -v ${{ github.workspace }}/build:/exist/autodeploy \ | |
| --name exist --rm --health-interval=1s --health-start-period=2s \ | |
| duncdrum/existdb:${{ matrix.exist-version }} | |
| - name: Wait for server to start | |
| timeout-minutes: 1 | |
| run: | | |
| echo "Waiting for server to start..." | |
| until docker logs exist 2>&1 | grep -q "Server has started"; do | |
| echo "Still waiting..." | |
| sleep 4 | |
| done | |
| # Test | |
| - name: Run smoke test | |
| run: bats --tap test/*.bats | |
| - name: debug logs | |
| if: failure() | |
| run: docker logs exist | grep 'ERROR' | |
| - name: Copy logs on failure | |
| if: failure() | |
| run: | | |
| echo "Copying logs..." | |
| docker cp exist:/exist/logs/exist.log ./exist.log | |
| - name: Upload logs artifact | |
| if: failure() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: jinks-template-exist-${{ matrix.exist-version }}-log | |
| path: exist.log |