diff --git a/.gitguardian.yml b/.gitguardian.yml new file mode 100644 index 0000000..01c3cb7 --- /dev/null +++ b/.gitguardian.yml @@ -0,0 +1,2 @@ +exclude: + - path: .github/workflows/* diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 60582b6..53926e6 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -3,13 +3,13 @@ name: Lint on: push: branches: - - master + - main pull_request: env: - RUBY_VERSION: 2.7.4 - NODE_VERSION: 12.9.1 - + RUBY_VERSION: 2.7.5 + NODE_VERSION: 16.9.1 + jobs: lint: name: Lint code @@ -34,4 +34,3 @@ jobs: - run: bundle exec mdl *.md name: Lint Markdown files - diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 17893ee..63d3771 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,25 +3,25 @@ name: Test on: push: branches: - - master + - main pull_request: env: - RUBY_VERSION: 2.7.4 - NODE_VERSION: 12.9.1 - + RUBY_VERSION: 2.7.5 + NODE_VERSION: 16.9.1 + jobs: test: name: Test - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 services: postgres: image: postgres:11 ports: - 5432:5432 env: - DATABASE_USERNAME: postgres - DATABASE_PASSWORD: postgres + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres POSTGRES_HOST_AUTH_METHOD: trust options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 @@ -35,18 +35,40 @@ jobs: ruby-version: ${{ env.RUBY_VERSION }} bundler-cache: true + - uses: nanasess/setup-chromedriver@v2 + with: + chromedriver-version: 119.0.6045.105 + + - name: List Chrome + shell: "bash" + run: apt list --installed | grep chrome + + - name: Remove Chrome + shell: "bash" + run: sudo apt remove google-chrome-stable + + - uses: browser-actions/setup-chrome@v1 + with: + chrome-version: 119.0.6045.105 + + - name: Bundle Install + run: bundle install + - name: Setup & create Database - run: | - bundle exec rails db:create db:schema:load + run: bundle exec rake db:test:prepare env: RAILS_ENV: test DATABASE_USERNAME: postgres DATABASE_PASSWORD: postgres - name: Precompile assets - run: bundle exec rake assets:precompile + run: | + npm ci + bundle exec rake assets:precompile env: RAILS_ENV: test + DATABASE_USERNAME: postgres + DATABASE_PASSWORD: postgres - name: Run RSpec run: SIMPLECOV=1 CODECOV=1 bundle exec rspec