Skip to content

Bump svgo from 3.0.2 to 3.2.0 #1042

Bump svgo from 3.0.2 to 3.2.0

Bump svgo from 3.0.2 to 3.2.0 #1042

Workflow file for this run

name: Lint, test and publish
on: [push, pull_request]
jobs:
php-lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup PHP Action
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
- name: Get Composer Cache Directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- run: |
composer install --prefer-source --quiet --no-interaction
composer test
caddy-fmt:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Format caddyfile
run: |
cd development
cp Caddyfile Caddyfile.orig
docker run -v $PWD:/srv caddy \
caddy fmt --overwrite
diff Caddyfile.orig Caddyfile
etc-lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Get yarn cache
id: yarn-cache
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Lint
run: |
yarn --dev
yarn run lint
docker-image:
name: Docker image test and publishing
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Edit configuration
run: |
mv configs/secret.php.example development/secret.php
mv configs/LocalSettings.php development
mv configs/Hotfix.php development
sed -i -r 's~ghcr\.io\/femiwiki\/mediawiki:.+~ghcr\.io\/femiwiki\/mediawiki:docker-test~' docker-compose.yml
- run: |
echo "version=$(date +%Y-%m-%dT%H-%M)-$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_OUTPUT
id: version
- name: Build a test image on amd64 and cache
uses: docker/build-push-action@v5
with:
platforms: linux/amd64
cache-from: ghcr.io/femiwiki/mediawiki:latest
cache-to: mode=max,type=local,dest=/tmp/.buildx-cache
load: true
push: false
tags: ghcr.io/femiwiki/mediawiki:docker-test
- name: Initialize docker swarm and start services
run: |
docker swarm init
docker stack deploy -c docker-compose.yml mediawiki
- name: Access 127.0.0.1:8080 until success
timeout-minutes: 3
run: |
echo 'Waiting for http...'
until curl -sLfo /dev/null 127.0.0.1:8080; do
sleep 1; done
- name: Test VisualEditor API
run: |
URL="127.0.0.1:8080/api.php?action=visualeditor&format=json&page=arbitrary_page&paction=parse&wikitext=arbitrary"
curl -sLfo /dev/null "$URL"
- name: Test Extension:Math
timeout-minutes: 1
run: |
URL="127.0.0.1:8080/w/Special:MathStatus"
until curl -sLfo /dev/null "$URL"; do
sleep 1; done
- name: backup of failure
if: ${{ failure() }}
timeout-minutes: 1
run: |
echo 'Failed to connect to 127.0.0.1:8080'
URL="127.0.0.1:8080/api.php?action=visualeditor&format=json&page=arbitrary_page&paction=parse&wikitext=arbitrary"
curl -Lv "$URL" && echo "VE success" || echo "VE failure"
URL="127.0.0.1:8080/w/Special:MathStatus"
curl -Lv "$URL" && echo "Math success" || echo "Math failure"
docker ps;
for s in $(docker service ls -q ); do docker service ps "$s"; done
docker container ps;
for s in $(docker service ls -q ); do docker service logs "$s"; done
- name: Check if the container is still up
run: test "$(docker service ps -qf 'desired-state=Running' -f 'desired-state=Ready' mediawiki_fastcgi)"
- name: Try to access the mediawiki
run: curl -sSLvo /dev/null 127.0.0.1:8080 || docker service logs mediawiki_fastcgi
- name: Login to GitHub Container Registry
if: github.repository_owner == 'femiwiki' && github.ref == 'refs/heads/main'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: save docker image
run: docker save -o "$(pwd)/docker-mediawiki" ghcr.io/femiwiki/mediawiki:docker-test
- uses: actions/upload-artifact@v3
with:
name: docker-image
path: docker-mediawiki
- name: Build a multi-platform docker image and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
cache-from: |
ghcr.io/femiwiki/mediawiki:latest
type=local,src=/tmp/.buildx-cache
cache-to: mode=max,type=inline
load: false
push: ${{ github.repository_owner == 'femiwiki' && github.ref == 'refs/heads/main' }}
tags: |
ghcr.io/femiwiki/mediawiki:latest
ghcr.io/femiwiki/mediawiki:${{ steps.version.outputs.version }}
- name: Submit a PR to our nomad repository
if: github.repository_owner == 'femiwiki' && github.ref == 'refs/heads/main'
env:
GH_TOKEN: ${{ secrets.BOT_TOKEN }}
run: |
gh workflow run -R femiwiki/nomad bump-mediawiki.yml \
-f tag=${{ steps.version.outputs.version }}