2021-03-24 21:41:37 +08:00
|
|
|
name: Ember CLI tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2021-09-08 01:17:04 +08:00
|
|
|
schedule:
|
|
|
|
- cron: '0 0 * * *'
|
2021-03-24 21:41:37 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: run
|
2021-09-03 01:27:31 +08:00
|
|
|
if: true
|
2021-03-24 21:41:37 +08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container: discourse/discourse_test:release
|
2021-09-10 03:32:56 +08:00
|
|
|
timeout-minutes: 60
|
2021-03-24 21:41:37 +08:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@master
|
|
|
|
with:
|
|
|
|
fetch-depth: 1
|
|
|
|
|
|
|
|
- name: Setup Git
|
|
|
|
run: |
|
|
|
|
git config --global user.email "ci@ci.invalid"
|
|
|
|
git config --global user.name "Discourse CI"
|
|
|
|
|
|
|
|
- name: Get yarn cache directory
|
|
|
|
id: yarn-cache-dir
|
|
|
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
|
|
|
|
|
|
- name: Yarn cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
id: yarn-cache
|
|
|
|
with:
|
|
|
|
path: ${{ steps.yarn-cache-dir.outputs.dir }}
|
|
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-yarn-
|
|
|
|
|
2021-09-08 01:17:04 +08:00
|
|
|
- name: Official Plugins Install
|
|
|
|
if: ${{ github.event_name == 'cron' }}
|
|
|
|
run: sudo -E -u discourse -H bundle exec rake plugin:install_all_official
|
|
|
|
|
2021-03-24 21:41:37 +08:00
|
|
|
- name: Yarn install
|
|
|
|
working-directory: ./app/assets/javascripts/discourse
|
|
|
|
run: yarn install
|
|
|
|
|
|
|
|
- name: Core QUnit
|
|
|
|
working-directory: ./app/assets/javascripts/discourse
|
2021-09-04 02:17:11 +08:00
|
|
|
run: sudo -E -u discourse -H yarn ember test
|
2021-09-10 03:32:56 +08:00
|
|
|
timeout-minutes: 60
|