Closed dotherightthing closed 4 years ago
Fixed by specifying the environmental variables with and after the commands to run:
# env: https://github.com/actions/virtual-environments/blob/master/images/linux/Ubuntu1604-README.md
# mysql start: https://github.com/actions/virtual-environments/issues/739
- name: Run tests
run: |
sudo /etc/init.d/mysql start
npm run test --if-present
env:
WPUNIT_DB_USER: root
WPUNIT_DB_PASS: root
WPUNIT_DB_HOST: 127.0.0.1
In both cases tests run locally, but the test suite is already installed.