Add docker-stop target #3955
Workflow file for this run
This file contains 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: gci-tests | |
on: | |
workflow_dispatch: | |
push: | |
branches: [master] | |
pull_request: | |
paths-ignore: | |
- "images/**" | |
- "sql/analytics/**" | |
- "**.md" | |
- "docs/**" | |
pull_request_target: | |
types: [labeled] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
if: ${{!github.event.issue.pull_request_target || contains(github.event.pull_request.labels.*.name, 'safe to test')}} | |
env: | |
DB_PASS_CI: kmq_ci_password | |
DB_USER_CI: root | |
DB_PORT: 3306 | |
steps: | |
- name: Checkout KMQ_Discord | |
uses: actions/checkout@v4 | |
- name: Check for undocumented game option commands | |
run: src/ci_checks/check_help.sh | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Setup MariaDB | |
uses: getong/[email protected] | |
with: | |
mariadb version: "10.6.17" | |
mysql root password: "$DB_PASS_CI" | |
- name: Check for newly introduced environment variables | |
run: python src/ci_checks/check_env_var.py | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Install protobuf compiler | |
run: sudo apt install -y protobuf-compiler | |
- name: Install node dependencies | |
run: yarn install --frozen-lockfile | |
- name: Prettier | |
run: npm run prettier-ci | |
- name: npm run lint | |
run: npm run lint-ci | |
- name: Lint translations | |
run: npm run lint-i18n-ci | |
- name: Check for missing translations | |
run: npx ts-node src/ci_checks/missing_i18n.ts $(find src -name '*.ts' -print) | |
- name: Copy .env for CI | |
run: | | |
echo "DB_USER=$DB_USER_CI" >> .env | |
echo "DB_PASS=$DB_PASS_CI" >> .env | |
echo "DB_HOST=127.0.0.1" >> .env | |
echo "DB_PORT=$DB_PORT" >> .env | |
echo "DB_PORT=3306" >> .env | |
echo "BOT_CLIENT_ID=123" >> .env | |
shell: bash | |
- name: Wait for MySQL server to start | |
run: | | |
while ! mysqladmin ping --host=127.0.0.1 --password="$DB_PASS_CI" --silent; do | |
sleep 1 | |
done | |
- name: Run tests | |
run: npm run test-ci |