Install node-gyp in Dockerfile #2139
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] | |
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 | |
AUDIO_SONGS_PER_ARTIST: 10 | |
PREMIUM_AUDIO_SONGS_PER_ARTIST: 50 | |
steps: | |
- name: Checkout KMQ_Discord | |
uses: actions/checkout@v2 | |
- name: Check for undocumented game option commands | |
run: src/ci_checks/check_help.sh | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Setup MariaDB | |
uses: getong/[email protected] | |
with: | |
mariadb version: "10.3.34" | |
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/[email protected] | |
with: | |
node-version: 16 | |
- 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 | |
echo "AUDIO_SONGS_PER_ARTIST=10" >> .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 |