Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Implement URL filtering in profanity check to production #338

Implement URL filtering in profanity check to production

Implement URL filtering in profanity check to production #338

Workflow file for this run

name: Run Tests
on:
push:
branches: [ master ]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
token: ${{ secrets.PAT }}
- uses: actions/setup-node@v1
with:
node-version: '18.x'
- name: Set up env
run: |
while read -r line; do
key=$(echo $line | cut -d= -f1)
value=$(echo $line | cut -d= -f2-)
echo "::add-mask::$value"
echo "$key=$value" >> $GITHUB_ENV
done < <(grep -o '^[^#]*' ./env/test.env)
- name: Shutdown Ubuntu MySQL (SUDO)
run: sudo service mysql stop # Shutdown the Default MySQL, "sudo" is necessary, please not remove it
- name: Setup MariaDB
uses: ankane/setup-mariadb@v1
with:
mariadb-version: 10.11
- name: Setup MariaDB environment
run: |
sudo mysql -u root -e "CREATE DATABASE $MARIADB_DATABASE;"
sudo mysql -u root -e "CREATE USER '$MARIADB_USERNAME'@'localhost' IDENTIFIED BY '$MARIADB_PASSWORD';"
sudo mysql -u root -e "GRANT ALL PRIVILEGES ON $MARIADB_DATABASE.* TO '$MARIADB_USERNAME'@'localhost';"
- name: Install dependencies
run: npm install
- name: Run tests
run: npm run test:no-reloading