Skip to content

Fix specs

Fix specs #297

name: Cucumber
on: push
jobs:
cucumber:
name: Run Tests
runs-on: ubuntu-latest
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Docker
run: |
docker compose -f docker-compose.yml up --quiet-pull --detach
- name: Wait until the web server is ready
run: until curl -s -f -o /dev/null "http://localhost:8080"; do sleep 5; done
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.0'
- name: Cache gems
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Install gems
run: |
bundle config path vendor/bundle
bundle install --quiet --jobs 4 --retry 3
- name: Run rubocop
run: |
bundle exec rubocop
- name: Run tests
run: |
bundle exec cucumber HEADLESS=true HOST=localhost staff_features/resources/resource_delete.feature:5
- name: Upload artifacts
if: failure()
uses: actions/upload-artifact@v3
with:
name: tmp
path: tmp/*