name: test on: push: branches: - master pull_request: types: - opened - synchronize - reopened jobs: unit: runs-on: ubuntu-latest strategy: fail-fast: false matrix: ruby: - "2.3" - "2.4" - "2.5" - "2.6" - "2.7" - "3.0" rubyopt: - "" - "--jit" exclude: # --jit is available since MRI 2.6 - ruby: "2.3" rubyopt: "--jit" - ruby: "2.4" rubyopt: "--jit" - ruby: "2.5" rubyopt: "--jit" env: RUBYOPT: ${{ matrix.rubyopt }} steps: - uses: actions/checkout@v2 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} bundler-cache: true - run: bundle update - run: bundle exec rake spec:unit - name: Slack Notification (not success) uses: lazy-actions/slatify@master if: "! success()" continue-on-error: true with: job_name: ${{ format('*unit* ({0},{1})', matrix.ruby, matrix.rubyopt) }} type: ${{ job.status }} icon_emoji: ":octocat:" url: ${{ secrets.SLACK_WEBHOOK }} token: ${{ secrets.GITHUB_TOKEN }} integration-docker: runs-on: ubuntu-latest strategy: fail-fast: false matrix: ruby: - "2.3" - "2.4" - "2.5" - "2.6" - "2.7" - "3.0" rubyopt: - "" - "--jit" image: - ubuntu:trusty exclude: # --jit is available since MRI 2.6 - ruby: "2.3" rubyopt: "--jit" - ruby: "2.4" rubyopt: "--jit" - ruby: "2.5" rubyopt: "--jit" env: RUBYOPT: ${{ matrix.rubyopt }} TEST_IMAGE: ${{ matrix.image }} steps: - uses: actions/checkout@v2 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} bundler-cache: true - run: bundle update - run: bundle exec rake spec:integration:docker:boot - run: bundle exec rake spec:integration:docker:provision env: # FIXME: avoid error for "Command `chmod 777 /tmp/itamae_tmp` failed. (exit status: 1)" ITAMAE_TMP_DIR: /var/tmp/itamae_tmp - run: bundle exec rake spec:integration:docker:serverspec - run: bundle exec rake spec:integration:docker:clean_docker_container - name: Slack Notification (not success) uses: lazy-actions/slatify@master if: "! success()" continue-on-error: true with: job_name: ${{ format('*integration-docker* ({0},{1},{2})', matrix.ruby, matrix.rubyopt, matrix.image) }} type: ${{ job.status }} icon_emoji: ":octocat:" url: ${{ secrets.SLACK_WEBHOOK }} token: ${{ secrets.GITHUB_TOKEN }} integration-local: runs-on: ubuntu-latest strategy: fail-fast: false matrix: ruby: - "2.3" - "2.4" - "2.5" - "2.6" - "2.7" - "3.0" rubyopt: - "" - "--jit" exclude: # --jit is available since MRI 2.6 - ruby: "2.3" rubyopt: "--jit" - ruby: "2.4" rubyopt: "--jit" - ruby: "2.5" rubyopt: "--jit" env: RUBYOPT: ${{ matrix.rubyopt }} steps: - uses: actions/checkout@v2 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} bundler-cache: true - run: bundle update - run: bundle exec rake spec:integration:local:main - run: bundle exec rake spec:integration:local:ordinary_user - name: Slack Notification (not success) uses: lazy-actions/slatify@master if: "! success()" continue-on-error: true with: job_name: ${{ format('*integration-local* ({0},{1})', matrix.ruby, matrix.rubyopt) }} type: ${{ job.status }} icon_emoji: ":octocat:" url: ${{ secrets.SLACK_WEBHOOK }} token: ${{ secrets.GITHUB_TOKEN }} notify: needs: - unit - integration-docker - integration-local runs-on: ubuntu-latest steps: - name: Slack Notification (success) uses: lazy-actions/slatify@master if: always() continue-on-error: true with: job_name: '*notify*' type: ${{ job.status }} icon_emoji: ":octocat:" url: ${{ secrets.SLACK_WEBHOOK }} token: ${{ secrets.GITHUB_TOKEN }}