Skip to content

DEV: Bump version

DEV: Bump version #287

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
jobs:
backend:
runs-on: ubuntu-latest
name: "Ruby ${{ matrix.ruby }} - Rails ${{ matrix.rails }}"
services:
redis:
image: redis
ports:
- 6379:6379
strategy:
matrix:
ruby: ['3.0', '3.1', '3.2', '3.3']
rails: ['6.1', '7.0', '7.1']
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails }}.gemfile
steps:
- uses: actions/checkout@v3
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
cache-dependency-path: client-app/yarn.lock
- name: Yarn install
working-directory: client-app
run: yarn install
- name: Build JS app
run: bash build_client_app.sh
- name: Tests (no Rails)
run: bundle exec rake test
- name: Tests (Railtie)
run: bundle exec rake test TEST=test/logster/test_railtie.rb
frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
cache-dependency-path: client-app/yarn.lock
- name: Yarn install
working-directory: client-app
run: yarn install
- name: JS tests
working-directory: client-app
run: yarn test:ember
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true
- name: Ruby lint
run: bundle exec rubocop
- uses: actions/setup-node@v3
if: ${{ !cancelled() }}
with:
node-version: 18
cache: yarn
cache-dependency-path: client-app/yarn.lock
- name: Yarn install
if: ${{ !cancelled() }}
working-directory: client-app
run: yarn install
- name: Syntax Tree
if: ${{ !cancelled() }}
run: |
bundle exec stree check Gemfile $(git ls-files '*.rb') $(git ls-files '*.rake') $(git ls-files '*.thor')
- name: JS linting
if: ${{ !cancelled() }}
working-directory: client-app
run: yarn lint
publish:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: [backend, frontend, linting]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
cache-dependency-path: client-app/yarn.lock
- name: Yarn install
working-directory: client-app
run: yarn install
- name: Build JS app
run: bash build_client_app.sh
- name: Release Gem
uses: discourse/publish-rubygems-action@v2
env:
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
GIT_EMAIL: team@discourse.org
GIT_NAME: discoursebot