2820 test #180
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
schedule: | |
- cron: '0 2 * * *' | |
jobs: | |
unit-tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest"] | |
ruby: ["2.7.1"] | |
bundler: ["2.1.4"] | |
include: | |
# Test versions from RHEL8 & RHEL9 | |
- os: ubuntu-latest | |
ruby: "3.1.2" | |
bundler: "2.3.7" | |
runs-on: ${{ matrix.os }} | |
name: Unit tests | |
steps: | |
- name: Checkout ${{ github.sha }} | |
uses: actions/checkout@v3 | |
- name: Setup Ruby ${{ matrix.ruby }} using Bundler ${{ matrix.bundler }} | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler: ${{ matrix.bundler }} | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/vendor/bundle | |
key: ${{ runner.os }}-${{ matrix.ruby }}-unit-gems-${{ hashFiles('apps/*/Gemfile.lock', 'Gemfile.lock') }}-1 | |
- name: Setup Bundler | |
run: | | |
bundle config path ~/vendor/bundle | |
bundle install | |
gem install rake | |
- name: Setup rclone | |
run: sudo apt-get update && sudo apt-get install rclone | |
- name: Run unit tests | |
run: bundle exec rake test:unit | |
- name: Run ShellCheck | |
run: bundle exec rake test:shellcheck | |
- name: Run Zeitwerk check | |
run: | | |
cd apps/dashboard | |
bundle install | |
bundle exec rake zeitwerk:check | |
- name: Run lint tests | |
run: bundle exec rake lint || true | |
- name: Run System Dashboard tests | |
run: cd apps/dashboard; bin/rake test:system | |
- name: Upload system test failures. | |
if: failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: system-test-failures | |
path: apps/dashboard/tmp/screenshots/*.png |