Update categories and eligibilities for DCYF. #396
Workflow file for this run
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 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 }} |