Skip to content

Recover all workflows #1

Recover all workflows

Recover all workflows #1

Workflow file for this run

name: Cucumber Test
env:
TZ: Europe/London
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID || '9c624e5d90c5b319d678e06d66c7671f1661fda826436d475f9679b54be63e26' }}
SKIP_AUTOMATIC_GEM_INSTALLATION: true # Disable the bundle install in bin/setup
on:
- push
- pull_request
jobs:
cucumber_tests:
runs-on: ubuntu-latest
env:
RAILS_ENV: cucumber
BUNDLE_WITHOUT: "deployment development test"
# Services
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_idservices
services:
mysql:
# Use the Mysql docker image https://hub.docker.com/_/mysql
image: mysql:8.0
ports:
- 3306 # Default port mappings
# Monitor the health of the container to mesaure when it is ready
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
env:
MYSQL_ROOT_PASSWORD: "" # Set root PW to nothing
MYSQL_ALLOW_EMPTY_PASSWORD: yes
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
# Establish a cache of js modules to improve performance
- name: Setup node
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
cache: "yarn"
# Install only the gems needed for testing
# Keep an eye on https://github.com/rubygems/bundler-features/issues/59
# in case bundler add an only flag
# We also set the install path to vendor/bundle to assist with out caching
# bin/setup handles the rest of the configuration for us.
- name: Setup environment
env:
DBPORT: ${{ job.services.mysql.ports[3306] }}
run: |
bin/setup
bundle exec rake assets:precompile
# Actually run our tests
- name: Run cucumber tests
run: |
bundle exec cucumber
env:
DBPORT: ${{ job.services.mysql.ports[3306] }}
- name: Upload capybara artifacts
uses: actions/upload-artifact@v2
if: ${{ failure() }}
with:
name: capybara-${{ github.job }}-${{ matrix.ci_node_index }}
path: tmp/capybara/
retention-days: 5
- name: Upload coverage artifact
uses: actions/upload-artifact@v2
with:
name: codeclimate-${{ github.job }}-${{ matrix.ci_node_index }}
path: coverage/coverage.json
retention-days: 1