Update puma to version 6.4.3 #900
Workflow file for this run
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: | |
pull_request: | |
branches: [master] | |
jobs: | |
linters: | |
name: Linters | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ruby-version: [3.1.2] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
bundler-cache: true | |
- name: Run linters and security checks | |
run: bin/quality | |
tests: | |
name: Tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ruby-version: [ 3.1.2 ] | |
services: | |
postgres: | |
image: postgres:12 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: tollowy_test | |
ports: [ "5432:5432" ] | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- 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 | |
- uses: getong/elasticsearch-action@v1.2 | |
with: | |
elasticsearch version: '8.2.0' | |
host port: 9200 | |
container port: 9200 | |
host node port: 9300 | |
node port: 9300 | |
discovery type: 'single-node' | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
bundler-cache: true | |
- uses: actions/cache@v1 | |
with: | |
path: vendor/bundle | |
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-gems- | |
- name: Build | |
env: | |
RAILS_ENV: test | |
run: | | |
sudo apt-get -yqq install libpq-dev | |
gem install bundler --no-document | |
bundle config path vendor/bundle | |
bundle install --jobs 4 --retry 3 | |
- name: Run tests | |
env: | |
PGHOST: 127.0.0.1 | |
PGUSER: postgres | |
RAILS_ENV: test | |
DATABASE_PASSWORD: postgres | |
PASSWORD_RECOVERY_LINK_TEMPLATE: http://localhost:5000/password_reset?token=%{password_reset_token} | |
CONFIRM_USER_LINK_TEMPLATE: http://localhost:5000/confirm_user?token=%{token_value} | |
CONFIRMATION_TOKEN_LENGTH: 40 | |
run: | | |
cp .github/workflows/.env.ci .env | |
bin/bundle exec rake db:test:prepare | |
CI= DISABLE_SPRING=true bin/tests ${@:-spec} | |
- name: Coveralls Parallel | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
flag-name: run-${{ matrix.ruby-version }} | |
path-to-lcov: coverage/lcov.info | |
parallel: true | |
- name: CodeClimate | |
uses: paambaati/codeclimate-action@v3.0.0 | |
env: | |
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | |
with: | |
coverageCommand: echo "coverageCommand..." | |
coverageLocations: ${{github.workspace}}/coverage/lcov.info:lcov | |
- name: codecov | |
uses: codecov/codecov-action@v2 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage/lcov.info | |
fail_ci_if_error: true | |
- name: Run codacy-coverage-reporter | |
uses: codacy/codacy-coverage-reporter-action@v1 | |
with: | |
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
coverage-reports: ./coverage/lcov.info | |
coverage: | |
name: Coverage | |
needs: tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Coveralls Finished | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
parallel-finished: true |