Skip to content

DEV: Version bump 2.13.0 #220

DEV: Version bump 2.13.0

DEV: Version bump 2.13.0 #220

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
jobs:
backend:
runs-on: ubuntu-latest
services:
redis:
image: redis
ports:
- 6379:6379
strategy:
matrix:
ruby: ['2.6', '2.7', '3.0', '3.1']
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
run: bundle exec rake test
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