Skip to content

Commit

Permalink
Merge branch 'main' into bump-php
Browse files Browse the repository at this point in the history
  • Loading branch information
lens0021 authored Sep 21, 2024
2 parents 3fc7c29 + b1d5793 commit ebf7364
Show file tree
Hide file tree
Showing 5 changed files with 190 additions and 43 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/sync-extension-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,12 @@ jobs:
strategy:
matrix:
repository:
- AchievementBadges
- DiscordRCFeed
- FacetedCategory
- FemiwikiSkin
- PageViewInfoGA
- Sanctions
- UnifiedExtensionForFemiwiki
branch:
- main
- REL1_39
- REL1_41
- REL1_42

runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"fix": "prettier . --write"
},
"devDependencies": {
"prettier": "^2.8.3"
"prettier": "^3.3.3"
}
}
80 changes: 80 additions & 0 deletions profile/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# [페미위키](https://femiwiki.com)

페미위키 깃헙에 오신 것을 환영합니다! 페미위키는 주류 위키들의 남성 중심적이고 여성 혐오적인 정보에 반대하여 약자, 소수자를 위해 만들어진 여성주의 정보 집합체입니다.

페미위키는 모든 소스코드를 오픈소스로 공개하고 있으며, 이슈트래커와 대화공간도
공개하고 있어 페미위키 구성원이 아닌 사람도 페미위키 개발에 쉽게 참여하실 수
있습니다.

- [각종 소스코드](https://github.com/femiwiki/)
- [페미위키 디스코드 #개발 채널](https://discord.gg/umzYjJcbvH)
- [페미위키 개발팀 칸반 보드](https://github.com/orgs/femiwiki/projects/5)
- [페미위키 개발팀 블로그](https://femiwiki.com/w/Project:%EA%B0%9C%EB%B0%9C_%EB%B8%94%EB%A1%9C%EA%B7%B8)

페미위키에 이슈나 버그, 원하시는 건의사항이 있으실 경우 언제든지 편하게 이슈를
남겨주세요.

## 페미위키 기술 개요

페미위키는 [AWS]를 사용하고 있으며, [Terraform]을 사용해 선언적으로 클라우드
인프라를 관리하고 있습니다. 페미위키에선 [EC2][Nomad][Docker] 컨테이너를 사용해 서비스들을
배포하고 있으며, [Github Container registry]에서 누구나 페미위키 컨테이너 이미지를 다운받을 수
있습니다. 사이트의 일부 정적 리소스는 [S3]에 저장됩니다. AWS SES, Lambda, SQS 등도 사용합니다.

[aws]: https://aws.amazon.com
[terraform]: https://terraform.io
[ec2]: https://aws.amazon.com/ec2
[nomad]: https://www.nomadproject.io/
[docker]: https://docker.com/
[github container registry]: https://github.com/orgs/femiwiki/packages?ecosystem=container
[s3]: https://aws.amazon.com/s3
[ses]: https://aws.amazon.com/ses
[lambda]: https://aws.amazon.com/lambda
[sqs]: https://aws.amazon.com/sqs

페미위키는 [미디어위키] 엔진을 사용하고 있고 [Caddy]를 웹서버로 사용합니다.
데이터베이스는 [MySQL], [Memcached]를 사용합니다.

[미디어위키]: https://www.mediawiki.org
[Caddy]: https://caddyserver.com
[MySQL]: https://www.mysql.com
[Memcached]: https://memcached.org/

미디어위키는 [PHP][Vue.js], [Less.js], [Lua] 등으로 이루어져 있으며 페미위키는 [FemiwikiSkin],
[Sanctions] 등 여러 미디어위키 확장기능을 자체개발하여 사용하고 있습니다.

[php]: https://www.php.net/
[vue.js]: https://vuejs.org/
[less.js]: https://lesscss.org/
[lua]: https://www.lua.org/
[femiwikiskin]: https://github.com/femiwiki/FemiwikiSkin
[sanctions]: https://github.com/femiwiki/Sanctions

페미위키에서 주로 작업하는 소스코드들은 GitHub과 Wikimedia Gerrit에 존재하며 아래 링크로 확인하실 수 있으십니다.

- [페미위키 테라폼](https://github.com/femiwiki/infra)
- [페미위키 Nomad](https://github.com/femiwiki/nomad)
- [도커 이미지 목록](https://github.com/femiwiki?q=docker-image+archived%3Ano)
- 미디어위키 확장기능
- [FemiwikiSkin]
- [그 외 자체 개발 확장 기능들](https://github.com/femiwiki?q=mediawiki-extension+fork%3Ano)

## 이용 허락

페미위키 코드들은 기본적으로 "GNU Affero General Public License version 3"
라이선스로 공개되어 있지만, 간혹 불가피하게 다른 라이센스를 사용하는 경우가
있습니다. 정확한 정보는 각 Repository 안에있는 `LICENSE` 파일을 참고해주세요.

AGPL-3.0은 미디어위키의 라이선스 정책인 "GPL-2.0 혹은 그 이상"과 호환됩니다.
자세한 정보는 [GNU FAQ]를 참고해 주세요.

[gnu faq]: https://www.gnu.org/licenses/gpl-faq.en.html#v2v3Compatibility

---

The source code of _femiwiki/femiwiki_ is primarily distributed under the terms
of the [GNU Affero General Public License v3.0] or any later version. See
[COPYRIGHT] for details.

[gnu affero general public license v3.0]: LICENSE
[copyright]: COPYRIGHT
135 changes: 103 additions & 32 deletions workflow-templates/.github/workflows/extension-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:
DOCKER_REGISTRY: docker-registry.wikimedia.org
DOCKER_ORG: releng
QUIBBLE_DOCKER_IMAGE: quibble-buster-php81
# There is no quibble-buster-php74-coverage yet
# There is no quibble-buster-php81-coverage yet
COVERAGE_DOCKER_IMAGE: quibble-buster-php74-coverage
PHAN_DOCKER_IMAGE: mediawiki-phan-php81

Expand Down Expand Up @@ -75,26 +75,19 @@ jobs:
fi
echo MEDIAWIKI_VERSION="${MEDIAWIKI_VERSION}" >> $GITHUB_ENV
if [ "${{ matrix.stage }}" == 'phan' ]; then
export DOCKER_IMAGE="${PHAN_DOCKER_IMAGE}"
elif [ "${{ matrix.stage }}" == coverage ]; then
export DOCKER_IMAGE="${COVERAGE_DOCKER_IMAGE}"
else
export DOCKER_IMAGE="${QUIBBLE_DOCKER_IMAGE}"
fi
echo "DOCKER_IMAGE=${DOCKER_IMAGE}" >> $GITHUB_ENV
# Get the latest docker tag (Ref: https://github.com/thcipriani/dockerregistry)
DOCKER_LATEST_TAG="$(curl -sL "https://${DOCKER_REGISTRY}/v2/${DOCKER_ORG}/${DOCKER_IMAGE}/tags/list" |
QUIBBLE_DOCKER_LATEST_TAG="$(curl -sL "https://${DOCKER_REGISTRY}/v2/${DOCKER_ORG}/${QUIBBLE_DOCKER_IMAGE}/tags/list" |
python3 -c 'import json;print("\n".join(json.loads(input())["tags"]))' |
grep -v latest | sort -Vr | head -1)"
echo "DOCKER_LATEST_TAG=${DOCKER_LATEST_TAG}" >> $GITHUB_ENV
echo "QUIBBLE_DOCKER_LATEST_TAG=${QUIBBLE_DOCKER_LATEST_TAG}" >> $GITHUB_ENV
if [ "${{ matrix.stage }}" == 'phan' ]; then
echo "QUIBBLE_DOCKER_LATEST_TAG=$(curl -sL "https://${DOCKER_REGISTRY}/v2/${DOCKER_ORG}/${QUIBBLE_DOCKER_IMAGE}/tags/list" |
echo "PHAN_DOCKER_LATEST_TAG=$(curl -sL "https://${DOCKER_REGISTRY}/v2/${DOCKER_ORG}/${PHAN_DOCKER_IMAGE}/tags/list" |
python3 -c 'import json;print("\n".join(json.loads(input())["tags"]))' |
grep -v latest | sort -Vr | head -1)" >> $GITHUB_ENV
elif [ "${{ matrix.stage }}" == 'coverage' ]; then
echo "QUIBBLE_DOCKER_LATEST_TAG=${DOCKER_LATEST_TAG}" >> $GITHUB_ENV
echo "COVERAGE_DOCKER_LATEST_TAG=$(curl -sL "https://${DOCKER_REGISTRY}/v2/${DOCKER_ORG}/${COVERAGE_DOCKER_IMAGE}/tags/list" |
python3 -c 'import json;print("\n".join(json.loads(input())["tags"]))' |
grep -v latest | sort -Vr | head -1)" >> $GITHUB_ENV
fi
# Resolve dependencies
Expand All @@ -105,26 +98,46 @@ jobs:
echo "DEPENDENCIES=$(python3 rd.py)" >> $GITHUB_ENV
fi
- name: Cache docker image
uses: actions/cache@v3
with:
path: /home/runner/docker-images/${{ env.DOCKER_IMAGE }}
key: ${{ env.DOCKER_IMAGE }}:${{ env.DOCKER_LATEST_TAG }}
- name: Load or pull docker image
run: |
docker load -i /home/runner/docker-images/"${DOCKER_IMAGE}" || \
docker pull "${DOCKER_REGISTRY}/${DOCKER_ORG}/${DOCKER_IMAGE}:${DOCKER_LATEST_TAG}"
- name: Cache quibble docker image
if: ${{ matrix.stage == 'coverage' || matrix.stage == 'phan' }}
uses: actions/cache@v3
with:
path: /home/runner/docker-images/${{ env.QUIBBLE_DOCKER_IMAGE }}
key: ${{ env.QUIBBLE_DOCKER_IMAGE }}:${{ env.QUIBBLE_DOCKER_LATEST_TAG }}
- name: Load or pull quibble docker image
if: ${{ matrix.stage == 'coverage' || matrix.stage == 'phan' }}
run: |
docker load -i /home/runner/docker-images/"${QUIBBLE_DOCKER_IMAGE}" || \
if [ -f /home/runner/docker-images/"${QUIBBLE_DOCKER_IMAGE}" ]; then
docker load -i /home/runner/docker-images/"${QUIBBLE_DOCKER_IMAGE}"
else
docker pull "${DOCKER_REGISTRY}/${DOCKER_ORG}/${QUIBBLE_DOCKER_IMAGE}:${QUIBBLE_DOCKER_LATEST_TAG}"
fi
- name: Cache quibble coverage docker image
if: matrix.stage == 'coverage'
uses: actions/cache@v3
with:
path: /home/runner/docker-images/${{ env.COVERAGE_DOCKER_IMAGE }}
key: ${{ env.COVERAGE_DOCKER_IMAGE }}:${{ env.COVERAGE_DOCKER_LATEST_TAG }}
- name: Cache phan docker image
if: matrix.stage == 'phan'
uses: actions/cache@v3
with:
path: /home/runner/docker-images/${{ env.PHAN_DOCKER_IMAGE }}
key: ${{ env.PHAN_DOCKER_IMAGE }}:${{ env.PHAN_DOCKER_LATEST_TAG }}
- name: Load or pull quibble coverage docker image
if: matrix.stage == 'coverage'
run: |
if [ -f /home/runner/docker-images/"${COVERAGE_DOCKER_IMAGE}" ]; then
docker load -i /home/runner/docker-images/"${COVERAGE_DOCKER_IMAGE}"
else
docker pull "${DOCKER_REGISTRY}/${DOCKER_ORG}/${COVERAGE_DOCKER_IMAGE}:${COVERAGE_DOCKER_LATEST_TAG}"
fi
- name: Load or pull phan docker image
if: matrix.stage == 'phan'
run: |
if [ -f /home/runner/docker-images/"${PHAN_DOCKER_IMAGE}" ]; then
docker load -i /home/runner/docker-images/"${PHAN_DOCKER_IMAGE}"
else
docker pull "${DOCKER_REGISTRY}/${DOCKER_ORG}/${PHAN_DOCKER_IMAGE}:${PHAN_DOCKER_LATEST_TAG}"
fi
- name: Cache MediaWiki installation
uses: actions/cache@v3
Expand All @@ -138,7 +151,57 @@ jobs:
git clone -b "${MEDIAWIKI_VERSION}" --depth 1 https://gerrit.wikimedia.org/r/mediawiki/core src
git clone --recurse-submodules -b "${MEDIAWIKI_VERSION}" --depth 1 https://gerrit.wikimedia.org/r/mediawiki/skins/Vector src/skins/Vector
for dep in $DEPENDENCIES; do
git clone --recurse-submodules -b "${MEDIAWIKI_VERSION}" --depth 1 "https://gerrit.wikimedia.org/r/${dep}" src/"$(echo $dep | cut -d'/' -f2,3)"
if [ "$dep" = 'mediawiki/extensions/Wikibase' ]; then
git clone -b "${MEDIAWIKI_VERSION}" --depth 1 "https://gerrit.wikimedia.org/r/${dep}" src/"$(echo $dep | cut -d'/' -f2,3)"
cd src/"$(echo $dep | cut -d'/' -f2,3)"
# https://gerrit.wikimedia.org/r/q/I2037cd8bb5d568021472e048900649028b5dcc62
git apply << 'EOF'
diff --git a/.gitmodules b/.gitmodules
index df41c768af..e9926d6ddd 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -3,13 +3,13 @@
url = https://gerrit.wikimedia.org/r/data-values/value-view
[submodule "view/lib/wikibase-serialization"]
path = view/lib/wikibase-serialization
- url = https://phabricator.wikimedia.org/source/wikibase-serialization.git
+ url = https://github.com/wmde/WikibaseSerializationJavaScript.git
[submodule "view/lib/wikibase-data-values"]
path = view/lib/wikibase-data-values
- url = https://phabricator.wikimedia.org/source/datavalues-javascript.git
+ url = https://github.com/wmde/DataValuesJavaScript.git
[submodule "view/lib/wikibase-data-model"]
path = view/lib/wikibase-data-model
- url = https://phabricator.wikimedia.org/source/wikibase-data-model.git
+ url = https://github.com/wmde/WikibaseDataModelJavaScript.git
[submodule "view/lib/wikibase-termbox"]
path = view/lib/wikibase-termbox
url = https://gerrit.wikimedia.org/r/wikibase/termbox
EOF
git submodule update --init
cd -
elif [ "$dep" = 'mediawiki/extensions/WikibaseLexeme' ]; then
git clone -b "${MEDIAWIKI_VERSION}" --depth 1 "https://gerrit.wikimedia.org/r/${dep}" src/"$(echo $dep | cut -d'/' -f2,3)"
cd src/"$(echo $dep | cut -d'/' -f2,3)"
# https://gerrit.wikimedia.org/r/q/I2037cd8bb5d568021472e048900649028b5dcc62
git apply << 'EOF'
diff --git a/.gitmodules b/.gitmodules
index 51ab4cd..97dff70 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,3 @@
[submodule "resources/special/new-lexeme"]
path = resources/special/new-lexeme
- url = https://phabricator.wikimedia.org/diffusion/NLSP/new-lexeme-special-page.git
+ url = https://github.com/wmde/new-lexeme-special-page.git
EOF
git submodule update --init
cd -
else
git clone --recurse-submodules -b "${MEDIAWIKI_VERSION}" --depth 1 "https://gerrit.wikimedia.org/r/${dep}" src/"$(echo $dep | cut -d'/' -f2,3)"
fi
done
fi
git -C src/ log -n 1 --format="%H"
Expand Down Expand Up @@ -198,7 +261,7 @@ jobs:
docker run \
-e "THING_SUBNAME=${{ env.TYPE }}s/${{ env.EXTENSION_NAME }}" \
-v "$(pwd)"/src:/mediawiki \
"${DOCKER_REGISTRY}/${DOCKER_ORG}/${DOCKER_IMAGE}:${DOCKER_LATEST_TAG}" \
"${DOCKER_REGISTRY}/${DOCKER_ORG}/${PHAN_DOCKER_IMAGE}:${PHAN_DOCKER_LATEST_TAG}" \
--color
elif [ "${{ matrix.stage }}" == 'coverage' ]; then
if [ -d tests/phpunit ]; then
Expand All @@ -215,7 +278,7 @@ jobs:
-v "$(pwd)"/cache:/cache \
-v "$(pwd)"/src:/workspace/src \
-v "$(pwd)"/cover:/workspace/cover \
"${DOCKER_REGISTRY}/${DOCKER_ORG}/${DOCKER_IMAGE}:${DOCKER_LATEST_TAG}" \
"${DOCKER_REGISTRY}/${DOCKER_ORG}/${COVERAGE_DOCKER_IMAGE}:${COVERAGE_DOCKER_LATEST_TAG}" \
--skip-zuul \
--skip-deps \
-c "${COMMEND}"
Expand All @@ -227,7 +290,7 @@ jobs:
-e "ZUUL_PROJECT=mediawiki/${{ env.TYPE }}s/${{ env.EXTENSION_NAME }}" \
-v "$(pwd)"/cache:/cache \
-v "$(pwd)"/src:/workspace/src \
"${DOCKER_REGISTRY}/${DOCKER_ORG}/${DOCKER_IMAGE}:${DOCKER_LATEST_TAG}" \
"${DOCKER_REGISTRY}/${DOCKER_ORG}/${QUIBBLE_DOCKER_IMAGE}:${QUIBBLE_DOCKER_LATEST_TAG}" \
--skip-zuul \
--packages-source composer \
--run "${{ matrix.stage }}" \
Expand All @@ -247,5 +310,13 @@ jobs:
# See https://doc.wikimedia.org/quibble/index.html#remove-localsettings-php-between-runs
rm "$(pwd)"/src/LocalSettings.php || true
mkdir -p docker-images
docker save -o "$(pwd)/docker-images/${DOCKER_IMAGE}" \
"${DOCKER_REGISTRY}/${DOCKER_ORG}/${DOCKER_IMAGE}:${DOCKER_LATEST_TAG}"
docker save -o "$(pwd)/docker-images/${QUIBBLE_DOCKER_IMAGE}" \
"${DOCKER_REGISTRY}/${DOCKER_ORG}/${QUIBBLE_DOCKER_IMAGE}:${QUIBBLE_DOCKER_LATEST_TAG}"
if [ -n "$PHAN_DOCKER_LATEST_TAG" ]; then
docker save -o "$(pwd)/docker-images/${PHAN_DOCKER_IMAGE}" \
"${DOCKER_REGISTRY}/${DOCKER_ORG}/${PHAN_DOCKER_IMAGE}:${PHAN_DOCKER_LATEST_TAG}"
elif [ -n "$COVERAGE_DOCKER_LATEST_TAG" ]; then
docker save -o "$(pwd)/docker-images/${COVERAGE_DOCKER_IMAGE}" \
"${DOCKER_REGISTRY}/${DOCKER_ORG}/${COVERAGE_DOCKER_IMAGE}:${COVERAGE_DOCKER_LATEST_TAG}"
fi
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# yarn lockfile v1


prettier@^2.8.3:
version "2.8.3"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.3.tgz#ab697b1d3dd46fb4626fbe2f543afe0cc98d8632"
integrity sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw==
prettier@^3.3.3:
version "3.3.3"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.3.tgz#30c54fe0be0d8d12e6ae61dbb10109ea00d53105"
integrity sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==

0 comments on commit ebf7364

Please sign in to comment.