Skip to content

Create CNAME

Create CNAME #4316

Workflow file for this run

name: Test
# triggers on
on: [push, pull_request]
jobs:
test:
env:
RAILS_ENV: test
NODE_ENV: test
# CI: 'true'
runs-on: ubuntu-latest # runner
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres
# Provide the password for postgres
env:
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
# Docker Hub image
image: redis:alpine
ports: ["6379:6379"]
# Set health checks to wait until redis has started
options: >-
--entrypoint redis-server
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout repository # copies repo in runner
uses: actions/checkout@v2 # short for https://github.com/actions/checkout
- name: Set up Ruby
uses: ruby/setup-ruby@v1 # short for https://github.com/ruby/setup-ruby
with:
# runs 'bundle install' and caches installed gems automatically
bundler-cache: true
- name: Bundle install
run: |
gem install bundle
bundle update --bundler
bundle install --jobs 4 --retry 3 --path 'vendor/bundle' --without development production
- name: Set up .env
run: echo "LOCKBOX_MASTER_KEY=0000000000000000000000000000000000000000000000000000000000000000" > .env
- name: Get Node.js version
id: nvm
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: "${{ steps.nvm.outputs.NODE_VERSION }}"
- name: Get Yarn cache directory path
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Setup cache key and directory for node_modules cache
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: Yarn install
run: yarn install --frozen-lockfile
- name: Prepare DB
run: |
cp config/database.github.yml config/database.yml
bundle exec rails db:create db:migrate
- name: Run tests
run: bundle exec rspec
# - name: Publish Unit Test Results
# uses: EnricoMi/publish-unit-test-result-action@v1
# if: always()
# with:
# files: rspec.xml
- name: Brakeman action
uses: artplan1/[email protected]