-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start running Appraisals in the build matrix
This goes further with splitting out different jobs, by listing the Appraisals in the matrix. The hope is that this will provide better feedback when parts of the build fails, as if we've got something like a flakey test, it should run against every combination. In addition to this, it extracts a "composite" action which allows for some reuse between different jobs. It's not possible to reuse the services section, unfortunately (YAML anchors aren't supported, which would be the ideal solution). https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs https://docs.github.com/en/actions/creating-actions/creating-a-composite-action actions/runner#1182
- Loading branch information
1 parent
50f91fc
commit 2ffa316
Showing
2 changed files
with
76 additions
and
28 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
name: Setup | ||
description: Shared setup steps | ||
inputs: | ||
ruby-version: | ||
required: true | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Set up Ruby ${{ inputs.ruby-version }} | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ inputs.ruby-version }} | ||
bundler-cache: true | ||
- name: Set up JS | ||
uses: actions/setup-node@v4 | ||
with: | ||
cache: yarn | ||
- name: Install Ruby dependencies | ||
run: bundle install | ||
shell: bash | ||
- name: Install Appraisal dependencies | ||
run: bundle exec appraisal install | ||
shell: bash | ||
- name: Install JS dependencies | ||
run: yarn install | ||
shell: bash | ||
- name: Setup the environment | ||
run: cp .sample.env .env | ||
shell: bash | ||
- run: cp spec/example_app/config/database.yml.sample spec/example_app/config/database.yml | ||
shell: bash | ||
- name: Setup the database | ||
run: bundle exec rake db:setup | ||
shell: bash | ||
- name: Build assets | ||
run: yarn run build && yarn run build:css | ||
shell: bash |
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