diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 65a1bdf..2a47c71 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -6,6 +6,10 @@ on: - main pull_request: +concurrency: + group: ci-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: RAILS_ENV: test PGUSER: discourse @@ -22,13 +26,23 @@ jobs: - name: Set working directory owner run: chown -R root:root . - - uses: actions/checkout@v4 + - uses: builtin:checkout + + - name: Cache gems + uses: actions/cache@v4 + with: + path: vendor/bundle + key: ${{ runner.os }}-lint-gems-${{ hashFiles('Gemfile.lock') }} + restore-keys: | + ${{ runner.os }}-lint-gems- - name: Install JS dependencies - run: pnpm install --frozen-lockfile + run: pnpm install --frozen-lockfile --prefer-offline - name: Bundle install - run: bundle install + run: | + bundle config set --local path vendor/bundle + bundle install - name: Rubocop run: bundle exec rubocop . @@ -49,7 +63,7 @@ jobs: run: chown -R root:root . - name: Checkout plugin - uses: actions/checkout@v4 + uses: builtin:checkout with: path: plugin @@ -119,7 +133,7 @@ jobs: - name: Install JS dependencies working-directory: core - run: pnpm install --frozen-lockfile + run: pnpm install --frozen-lockfile --prefer-offline - name: Restore database from cache if: steps.app-cache.outputs.cache-hit == 'true'