diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2dc89071..4c66f8ff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,9 +9,7 @@ on: jobs: erb_javascript_rails: runs-on: ubuntu-latest - container: - image: ruby:2.5.8-buster - name: "ERBLint, ESCheck, ESLint, and RSpec" + name: "ES Check, ERBLint, ESLint, and RSpec" env: RAILS_ENV: test services: @@ -29,40 +27,25 @@ jobs: --health-timeout 5s --health-retries 5 steps: - - uses: actions/checkout@v3 - name: Install required apt packages - run: apt-get install -yqq libpq-dev - # TODO: Migrate this to use ruby/setup-ruby when we're - # able to use a new version of Node.js. - - # There is a python-2.7 dependency that can't be met without using the - # ruby-2.5.8-buster Docker image. - - name: Bundle install - run: bundle install -j $(nproc) --path vendor/bundle + run: sudo apt-get install -y python2 + - uses: actions/checkout@v3 + - uses: ruby/setup-ruby@v1 + with: + bundler-cache: true - uses: actions/setup-node@v3 with: node-version: 10.13.x - - name: Run yarn install - uses: borales/actions-yarn@v4 - with: - cmd: install - - name: Run yarn lint - uses: borales/actions-yarn@v4 - with: - cmd: lint - - name: Run ERBLint - uses: borales/actions-yarn@v4 - with: - cmd: lint-erb + cache: 'yarn' - name: Precomple Rails assets run: bundle exec rails assets:precompile - - name: Run yarn es-check - uses: borales/actions-yarn@v4 - with: - cmd: es-check + - name: Run ES Check + run: yarn es-check + - name: Run ERBLint + run: yarn lint-erb + - name: Run ESLint + run: yarn lint - name: Setup DB and run RSpec - env: - DATABASE_HOST: postgres run: |- bundle exec rails db:create bundle exec rake db:schema:load --trace