Merge pull request #415 from meggsimum/dependabot/npm_and_yarn/babel/… #918
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
| name: ci-geoserver-node-client | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| run-tests-maintenance: | |
| runs-on: ubuntu-latest | |
| env: | |
| GEOSERVER_VERSION: 2.27.4 | |
| GEOSERVER_PORT: 8080 | |
| steps: | |
| - name: Install program "wait-for-it" | |
| run: sudo apt install wait-for-it | |
| # use Node.js 22 instead of deprecated v12 in Ubuntu image | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: '22' | |
| - uses: actions/checkout@v4 | |
| # In this step, this action saves a list of existing images, | |
| # the cache is created without them in the post run. | |
| # It also restores the cache if it exists. | |
| - uses: satackey/action-docker-layer-caching@v0.0.11 | |
| # Ignore the failure of a step and avoid terminating the job. | |
| continue-on-error: true | |
| - name: Create empty temp directory as volume for GeoServer data | |
| run: | | |
| RANDOM_FOLDER="docker-temp-$(uuidgen)" | |
| TEMP_DIR="${{ runner.temp }}/$RANDOM_FOLDER" | |
| echo "TEMP_DIR=$TEMP_DIR" >> $GITHUB_ENV | |
| rm -rf "$TEMP_DIR" | |
| mkdir -p "$TEMP_DIR" | |
| echo "Temp directory is ready at $TEMP_DIR" | |
| - name: Run docker-compose test setup | |
| run: | | |
| export TEMP_DIR="$TEMP_DIR" | |
| docker compose -f test/docker-compose.yml up -d | |
| # finishes when tomcat of GeoServer is running | |
| - run: wait-for-it "localhost:8080" | |
| # we use wget to ensure that GeoServer is running | |
| - run: wget http://localhost:8080/geoserver/web | |
| - run: npm install | |
| - run: npm run test:reset-gs # ensure empty GeoServer | |
| - run: npm run test | |
| run-tests-stable: | |
| runs-on: ubuntu-latest | |
| env: | |
| GEOSERVER_VERSION: 2.28.1 | |
| GEOSERVER_PORT: 8081 | |
| steps: | |
| - name: Install program "wait-for-it" | |
| run: sudo apt install wait-for-it | |
| # use Node.js 22 instead of deprecated v12 in Ubuntu image | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: '22' | |
| - uses: actions/checkout@v4 | |
| # In this step, this action saves a list of existing images, | |
| # the cache is created without them in the post run. | |
| # It also restores the cache if it exists. | |
| - uses: satackey/action-docker-layer-caching@v0.0.11 | |
| # Ignore the failure of a step and avoid terminating the job. | |
| continue-on-error: true | |
| - name: Create empty temp directory as volume for GeoServer data | |
| run: | | |
| RANDOM_FOLDER="docker-temp-$(uuidgen)" | |
| TEMP_DIR="${{ runner.temp }}/$RANDOM_FOLDER" | |
| echo "TEMP_DIR=$TEMP_DIR" >> $GITHUB_ENV | |
| rm -rf "$TEMP_DIR" | |
| mkdir -p "$TEMP_DIR" | |
| echo "Temp directory is ready at $TEMP_DIR" | |
| - name: Run docker-compose test setup | |
| run: | | |
| export TEMP_DIR="$TEMP_DIR" | |
| docker compose -f test/docker-compose.yml up -d | |
| # finishes when tomcat of GeoServer is running | |
| - run: wait-for-it "localhost:8081" | |
| # we use wget to ensure that GeoServer is running | |
| - run: wget http://localhost:8081/geoserver/web | |
| - run: npm install | |
| - run: npm run test:reset-gs # ensure empty GeoServer | |
| - run: npm run test |