# This Evennia workflow will install Python dependencies, run tests with a variety of Python versions # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions name: test-suite on: push: branches: [ master, develop ] paths-ignore: - 'docs/**' pull_request: branches: [ master, develop ] jobs: build: runs-on: ubuntu-latest strategy: fail-fast: false matrix: python-version: ['3.9', '3.10'] TESTING_DB: ['sqlite3', 'postgresql', 'mysql'] steps: - uses: actions/checkout@v2 - name: Set up PostgreSQL server uses: harmon758/postgresql-action@v1 if: ${{ matrix.TESTING_DB == 'postgresql' }} with: postgresql version: '10.7' postgresql db: 'evennia' postgresql user: 'evennia' postgresql password: 'password' - name: Set up MySQL server uses: mirromutth/mysql-action@v1.1 if: ${{ matrix.TESTING_DB == 'mysql'}} with: host port: 3306 # character set server: 'utf8mb4' # collation server: 'utf8mb4_unicode_ci' character set server: 'utf8' collation server: 'utf8_general_ci' default storage engine: 'InnoDB' mysql database: 'evennia' mysql user: 'evennia' mysql password: 'password' mysql root password: root_password # wait for db to activate - name: wait for db to activate if: matrix.TESTING_DB == 'postgresql' || matrix.TESTING_DB == 'mysql' run: | if [ ${{ matrix.TESTING_DB }} = mysql ] then while ! mysqladmin ping -h 127.0.0.1 -u root -proot_password -s >/dev/null 2>&1 do sleep 1 echo -n . done echo else while ! pg_isready -h 127.0.0.1 -q >/dev/null 2>&1 do sleep 1 echo -n . done echo fi - name: mysql privileges if: matrix.TESTING_DB == 'mysql' run: | cat <