update changelog #344
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 uses actions that are not certified by GitHub. They are | |
# provided by a third-party and are governed by separate terms of service, | |
# privacy policy, and support documentation. | |
# | |
# This workflow will install a prebuilt Ruby version, install dependencies, and | |
# run tests and linters. | |
name: "Generate sample app and run tests" | |
on: [push] | |
jobs: | |
test_html: | |
name: 🧪 Run HTML Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Ruby and gems | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.2" | |
bundler-cache: true | |
- name: Install the latest Rails gem | |
run: gem install rails -v "7.2.1" | |
- name: Install Rubocop | |
run: gem install rubocop rubocop-performance rubocop-minitest rubocop-packaging rubocop-minitest rubocop-rails | |
- name: Install Brakeman | |
run: gem install brakeman | |
- name: Create fresh Rails app and run generator | |
run: | | |
rails new test-app --skip-action-mailbox --skip-action-text --skip-active-storage | |
cp .rubocop.yml test-app/.rubocop.yml | |
cd test-app | |
bundle add authentication-zero --path .. | |
bin/rails generate authentication | |
bundle install | |
bin/rails db:migrate | |
- name: Rubocop | |
run: cd test-app && rubocop | |
- name: Brakeman | |
run: cd test-app && brakeman | |
- name: Tests | |
run: | | |
cd test-app | |
bin/rails test | |
test_api: | |
name: 🧪 Run API Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Ruby and gems | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.2" | |
bundler-cache: true | |
- name: Install the latest Rails gem | |
run: gem install rails -v "7.2.1" | |
- name: Install Rubocop | |
run: gem install rubocop rubocop-performance rubocop-minitest rubocop-packaging rubocop-minitest rubocop-rails | |
- name: Install Brakeman | |
run: gem install brakeman | |
- name: Create fresh Rails app and run generator | |
run: | | |
rails new test-app --skip-action-mailbox --skip-action-text --skip-active-storage | |
cp .rubocop.yml test-app/.rubocop.yml | |
cd test-app | |
bundle add authentication-zero --path .. | |
bin/rails generate authentication --api | |
bundle install | |
bin/rails db:migrate | |
- name: Rubocop | |
run: cd test-app && rubocop | |
- name: Brakeman | |
run: cd test-app && brakeman | |
- name: Tests | |
run: cd test-app && bin/rails test |