-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
116 additions
and
40 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: smoke-test | ||
description: runs smoke tests | ||
|
||
inputs: | ||
environment: | ||
description: Environment to run tests in | ||
required: true | ||
url: | ||
description: APP URL | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
services: | ||
postgres: | ||
image: postgres:11-alpine | ||
ports: | ||
- '5432:5432' | ||
env: | ||
POSTGRES_DB: rails_test | ||
POSTGRES_USER: rails | ||
POSTGRES_PASSWORD: password | ||
env: | ||
RAILS_ENV: test | ||
DATABASE_URL: 'postgres://rails:password@localhost:5432/rails_test' | ||
GOVUK_NOTIFY_API_KEY: dummy | ||
GOVUK_NOTIFY_GENERIC_EMAIL_TEMPLATE_ID: dummy | ||
|
||
steps: | ||
- name: Set up Ruby 3.2.2 | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.2.2 | ||
|
||
- name: Bundle smoke test gems | ||
shell: bash | ||
run: | | ||
gem install bundler | ||
echo 'gem "rspec"' >> Gemfile | ||
bundle | ||
- name: Run smoke tests | ||
shell: bash | ||
run: bin/smoke | ||
env: | ||
SMOKE_URL: ${{ inputs.url }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: smoke-test | ||
description: runs smoke tests | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
environment: | ||
description: Environment to run tests in | ||
required: true | ||
url: | ||
description: APP URL | ||
required: true | ||
|
||
jobs: | ||
smoke-test: | ||
runs_on: ubuntu-latest | ||
services: | ||
postgres: | ||
image: postgres:11-alpine | ||
ports: | ||
- '5432:5432' | ||
env: | ||
POSTGRES_DB: rails_test | ||
POSTGRES_USER: rails | ||
POSTGRES_PASSWORD: password | ||
env: | ||
RAILS_ENV: test | ||
DATABASE_URL: 'postgres://rails:password@localhost:5432/rails_test' | ||
GOVUK_NOTIFY_API_KEY: dummy | ||
GOVUK_NOTIFY_GENERIC_EMAIL_TEMPLATE_ID: dummy | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
# - name: Setup Node.js | ||
# uses: actions/setup-node@v4 | ||
# with: | ||
# node-version: '18.18.2' | ||
# - name: Setup yarn | ||
# run: npm install -g yarn | ||
# - name: Install Node packages | ||
# run: yarn install | ||
- name: Set up Ruby 3.2.2 | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.2.2 | ||
# - name: Precompile assets | ||
# run: bundle exec rails assets:precompile | ||
# - name: Set up database schema | ||
# run: bin/rails db:schema:load | ||
# - name: Copy env file | ||
# run: cp .env.example .env | ||
|
||
|
||
- name: Bundle smoke test gems | ||
shell: bash | ||
run: | | ||
gem install bundler | ||
echo 'gem "rspec"' >> Gemfile | ||
bundle | ||
- name: Run smoke tests | ||
shell: bash | ||
run: bin/smoke | ||
env: | ||
SMOKE_URL: ${{ inputs.url }} |