Skip to content

689 user columns and endpoints #375

689 user columns and endpoints

689 user columns and endpoints #375

Workflow file for this run

# This workflow will do a clean install of node dependencies, and run linting and testing checks on the current branch
name: testsuite
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
RUBY_VERSION: 2.7.4
NODE_VERSION: 16.x
RAILS_ENV: test
TEXTELLENT_AUTH_CODE: ${{ secrets.TEXTELLENT_AUTH_CODE }}
DOCKER_REPO: sheltertechsf/askdarcel-api
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}
bundler-cache: true
- run: bundle exec rake rubocop
test_unit:
runs-on: ubuntu-latest
services:
db:
image: postgres:9.5
ports: [ '5432:5432' ]
env:
POSTGRES_HOST_AUTH_METHOD: trust
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}
bundler-cache: true
- run: bundle exec rake db:create db:schema:load
- run: bundle exec rails swagger
- run: bundle exec rake spec
test_postman:
runs-on: ubuntu-latest
services:
db:
image: postgres:9.5
ports: [ '5432:5432' ]
env:
POSTGRES_HOST_AUTH_METHOD: trust
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}
bundler-cache: true
- uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
- run: yarn global add newman
- run: ./travis/postman.sh
publish-latest:
runs-on: ubuntu-latest
needs: [lint, test_unit, test_postman]
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
steps:
- uses: actions/checkout@v2
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- uses: docker/build-push-action@v2
with:
push: true
tags: ${{ env.DOCKER_REPO }}:latest
- run: echo ${{ steps.docker_build.outputs.digest }}