ci: do not use deprecated actions/cache
(#218)
#969
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: Test | |
on: | |
push: | |
branches: | |
- develop | |
- master | |
pull_request: | |
branches: | |
- develop | |
jobs: | |
phpunit: | |
name: PHP Unit | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Start MySQL | |
run: sudo systemctl start mysql.service | |
- name: Configure sysctl limits | |
run: | | |
sudo swapoff -a | |
sudo sysctl -w vm.swappiness=1 | |
sudo sysctl -w fs.file-max=262144 | |
sudo sysctl -w vm.max_map_count=262144 | |
- name: Setup Elasticsearch | |
uses: getong/elasticsearch-action@v1.2 | |
with: | |
elasticsearch version: '7.5.0' | |
- name: Set PHP version | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.2' | |
coverage: none | |
- name: Install PHP Dependencies | |
uses: ramsey/composer-install@3.0.0 | |
- name: Setup WP Tests | |
run: | | |
bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1 | |
sleep 10 | |
- name: PHPUnit | |
run: | | |
composer run-script test | |
composer run-script test-single-site |