Merge pull request #1053 from sanger/depfu/update/puma-7.2.0 #2701
This file contains hidden or 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: Ruby | |
| env: | |
| TZ: Europe/London | |
| on: | |
| - push | |
| - pull_request | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| env: | |
| RAILS_ENV: test | |
| services: | |
| mysql: | |
| # Use the Mysql docker image https://hub.docker.com/_/mysql | |
| image: mysql:8.0 | |
| ports: | |
| - 3306 # Default port mappings | |
| options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
| env: | |
| MYSQL_ALLOW_EMPTY_PASSWORD: yes | |
| MYSQL_ROOT_PASSWORD: '' | |
| MYSQL_DATABASE: labwhere_test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Export node version | |
| id: node_version | |
| run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc) | |
| - name: Setup node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ steps.node_version.outputs.NODE_VERSION }} | |
| - run: npm install | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true # Runs bundle install and caches gems. See the ruby_test.yml | |
| # example if you need more control over bundler. | |
| - name: Set up environment | |
| env: | |
| DBPORT: ${{ job.services.mysql.ports[3306] }} | |
| run: | | |
| cp config/database.yml.example config/database.yml | |
| cp config/bunny.yml.example config/bunny.yml | |
| bundle exec rails db:setup | |
| bundle exec rails about | |
| bundle exec rails stats | |
| - name: Run tests | |
| env: | |
| DBPORT: ${{ job.services.mysql.ports[3306] }} | |
| run: bundle exec rake | |
| lint: | |
| runs-on: ubuntu-latest | |
| env: | |
| RAILS_ENV: test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true # Runs bundle install and caches gems. See the ruby_test.yml | |
| # example if you need more control over bundler. | |
| - name: Run rubocop | |
| run: bundle exec rubocop -c .rubocop.yml --fail-fast |