|
6 | 6 | -main |
7 | 7 | pull_request: |
8 | 8 |
|
| 9 | +concurrency: |
| 10 | +group:plugin-tests-${{ format('{0}-{1}', github.head_ref || github.run_number, github.job) }} |
| 11 | +cancel-in-progress:true |
| 12 | + |
9 | 13 | jobs: |
10 | 14 | build: |
11 | 15 | name:${{ matrix.build_type }} |
12 | 16 | runs-on:ubuntu-latest |
13 | | -container:discourse/discourse_test:slim${{ matrix.build_type =='frontend' && '-browsers' || '' }} |
14 | | -timeout-minutes:60 |
| 17 | +container:discourse/discourse_test:slim${{startsWith(matrix.build_type,'frontend') && '-browsers' || '' }} |
| 18 | +timeout-minutes:30 |
15 | 19 |
|
16 | 20 | env: |
17 | 21 | DISCOURSE_HOSTNAME:www.example.com |
|
24 | 28 | fail-fast:false |
25 | 29 |
|
26 | 30 | matrix: |
27 | | -build_type:["backend", "frontend"] |
| 31 | +build_type:["backend", "frontend-legacy", "frontend"] |
28 | 32 |
|
29 | 33 | steps: |
30 | 34 | -uses:actions/checkout@v2 |
|
46 | 50 | -name:Start redis |
47 | 51 | run:| |
48 | 52 | redis-server /etc/redis/redis.conf & |
49 | | -
|
| 53 | +
|
50 | 54 | -name:Start Postgres |
51 | 55 | run:| |
52 | 56 | chown -R postgres /var/run/postgresql |
|
63 | 67 |
|
64 | 68 | -name:Setup gems |
65 | 69 | run:| |
| 70 | + gem install bundler --conservative -v $(awk '/BUNDLED WITH/ { getline; gsub(/ /,""); print $0 }' Gemfile.lock) |
66 | 71 | bundle config --local path vendor/bundle |
67 | 72 | bundle config --local deploymenttrue |
68 | 73 | bundle config --local without development |
|
94 | 99 | id:app-cache |
95 | 100 | with: |
96 | 101 | path:tmp/app-cache |
97 | | -key:>-# postgres version, hash of migrations, "parallel?" |
98 | | - ${{ runner.os }}- |
| 102 | +key:>- |
99 | 103 | ${{ hashFiles('.github/workflows/tests.yml') }}- |
100 | | - ${{ matrix.postgres }}- |
101 | 104 | ${{ hashFiles('db/**/*', 'plugins/**/db/**/*') }}- |
102 | | - ${{ env.USES_PARALLEL_DATABASES }} |
103 | 105 |
|
104 | 106 | -name:Restore database from cache |
105 | 107 | if:steps.app-cache.outputs.cache-hit == 'true' |
@@ -144,6 +146,11 @@ jobs: |
144 | 146 | fi |
145 | 147 |
|
146 | 148 | -name:Plugin QUnit |
| 149 | +if:matrix.build_type == 'frontend-legacy' && steps.check_qunit.outputs.files_exist == 'true' |
| 150 | +run:QUNIT_EMBER_CLI=0 bundle exec rake plugin:qunit['${{ github.event.repository.name }}','1200000'] |
| 151 | +timeout-minutes:10 |
| 152 | + |
| 153 | + -name:Plugin QUnit (Ember CLI) |
147 | 154 | if:matrix.build_type == 'frontend' && steps.check_qunit.outputs.files_exist == 'true' |
148 | | -run:bundle exec rake plugin:qunit['${{ github.event.repository.name }}','1200000'] |
149 | | -timeout-minutes:30 |
| 155 | +run:QUNIT_EMBER_CLI=1bundle exec rake plugin:qunit['${{ github.event.repository.name }}','1200000'] |
| 156 | +timeout-minutes:10 |