Remove deprecated GH action function #165
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: mirromutth/[email protected] | |
with: | |
mysql database: kcal | |
mysql root password: root | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.2' | |
coverage: xdebug | |
- name: Configure sysctl limits for Elasticsearch | |
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: Run Elasticsearch | |
uses: elastic/elastic-github-actions/elasticsearch@master | |
with: | |
stack-version: '7.14.1' | |
- uses: actions/checkout@v4 | |
- name: Get Composer cache directory | |
id: composer-cache | |
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install dependencies | |
run: composer install --no-progress --no-interaction | |
- name: Generate app key | |
run: | | |
php -r "file_exists('.env') || copy('.env.ci', '.env');" | |
php artisan key:generate | |
- name: Run tests | |
run: php artisan test --parallel --recreate-databases --coverage-clover build/logs/clover.xml | |
- name: Upload coverage results to Coveralls | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v |