diff --git a/.github/workflows/pull_requests.yml b/.github/workflows/pull_requests.yml new file mode 100644 index 0000000..620338f --- /dev/null +++ b/.github/workflows/pull_requests.yml @@ -0,0 +1,61 @@ +name: Workflow for changes in the main branch + +on: + push: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + + services: + postgres: + image: postgres:9.6.2-alpine + ports: + - 5432:5432 + env: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: myinterviews_test + # needed because the postgres container does not provide a healthcheck + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + + steps: + - uses: actions/checkout@v3 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.6.6 + bundler-cache: true + + - name: Install PostgreSQL dev libs + run: sudo apt-get -yqq install libpq-dev + + - name: Run rubocop + run: bundle exec rubocop --parallel + + - name: Setup Database + env: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: myinterviews_test + POSTGRES_HOST: localhost + RAILS_ENV: test + RUBYOPT: "-W:no-deprecated -W:no-experimental" # Suppress Rails 6 deprecation warnings for ruby 2.7 + run: bin/rails db:create db:schema:load --trace db:migrate + + - name: Check test factories + run: bundle exec rake factory_bot:lint + + - name: Run tests + env: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: myinterviews_test + POSTGRES_HOST: localhost + RAILS_ENV: test + RUBYOPT: "-W:no-deprecated -W:no-experimental" # Suppress Rails 6 deprecation warnings for ruby 2.7 + run: bundle exec rspec \ No newline at end of file diff --git a/.github/workflows/push_main.yml b/.github/workflows/push_main.yml new file mode 100644 index 0000000..5fac85b --- /dev/null +++ b/.github/workflows/push_main.yml @@ -0,0 +1,33 @@ +name: Workflow for changes in the main branch + +on: + push: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + + - name: Run tests + run: bundle exec rspec + + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v3 + with: + context: . + push: true + tags: emilio2hd/myinterviews:latest + cache-from: type=registry,ref=emilio2hd/myinterviews:latest + cache-to: type=inline \ No newline at end of file diff --git a/README.md b/README.md index 15ad9b9..b28c82d 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,13 @@ -myinterviews +myinterviews ============= -[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy) [![Build Status](https://circleci.com/gh/emilio2hd/myinterviews.svg?style=shield)](https://app.circleci.com/pipelines/github/emilio2hd/myinterviews) [![codebeat badge](https://codebeat.co/badges/ef8d86f7-cf6c-4726-bd2d-4bac89cc62c1)](https://codebeat.co/projects/github-com-emilio2hd-myinterviews-master) [![Coverage Status](https://coveralls.io/repos/github/emilio2hd/myinterviews/badge.svg?branch=add-coverall)](https://coveralls.io/github/emilio2hd/myinterviews?branch=add-coverall) The goal of this app is to manage job applications, interviews, cover letters and feedbacks. - + ![Template](./docs/images/interviews.png) - + # Docker You can run the application using Docker. @@ -92,8 +91,8 @@ volumes: ``` # Email Configuration -My Interviews has support to send emails by smtp only. -:warning: Note: As of July 15, 2014, Google increased [its security measures](https://support.google.com/accounts/answer/6010255) +My Interviews has support to send emails by smtp only. +:warning: Note: As of July 15, 2014, Google increased [its security measures](https://support.google.com/accounts/answer/6010255) and now blocks attempts from apps it deems less secure. # Contributions