Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyCTHsu committed Jan 28, 2025
1 parent 452cf4c commit 5c0ef93
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ jobs:
with:
name: bundled-lockfile-${{ github.run_id }}-${{ matrix.engine.alias }}
retention-days: 1
path: |
Gemfile.lock
path: Gemfile.lock
- id: set-matrix
run: |
matrix_json=$(bundle exec rake github:generate_matrix)
Expand All @@ -43,14 +42,12 @@ jobs:
echo "$matrix_json"
# Set the output
echo "${{ matrix.engine.alias }}=$matrix_json" >> $GITHUB_OUTPUT
- run: bundle exec rake dependency:install
- uses: actions/upload-artifact@v4
with:
name: bundled-dependencies-${{ github.run_id }}-${{ matrix.engine.alias }}
retention-days: 1
path: |
/usr/local/bundle
path: "/usr/local/bundle"
test-ruby-33:
name: ruby-3.3 batch ${{ matrix.batch }}
needs:
Expand Down Expand Up @@ -90,7 +87,7 @@ jobs:
- uses: actions/download-artifact@v4
with:
name: bundled-dependencies-${{ github.run_id }}-ruby-33
path: /usr/local/bundle
path: "/usr/local/bundle"
- run: bundle install
- name: Run batched tests
env:
Expand Down
24 changes: 18 additions & 6 deletions tasks/github.rake
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,20 @@ namespace :github do
'name' => 'Configure Git',
'run' => 'git config --global --add safe.directory "$GITHUB_WORKSPACE"'
},
{
'uses' => 'actions/download-artifact@v4',
'with' => {
'name' => "bundled-lockfile-${{ github.run_id }}-#{runtime.alias}",
}
},
{
'uses' => 'actions/download-artifact@v4',
'with' => {
'name' => "bundled-dependencies-${{ github.run_id }}-#{runtime.alias}",
'path' => '/usr/local/bundle'
}
},
{ 'run' => 'bundle install --local' },
{ 'run' => 'bundle install' },
{
'name' => 'Run batched tests',
'env' => { 'MATRIX_TASKS' => '${{ toJSON(matrix.tasks) }}' },
Expand Down Expand Up @@ -118,6 +125,14 @@ namespace :github do
'steps' => [
{ 'uses' => 'actions/checkout@v4' },
{ 'run' => 'bundle install' },
{
'uses' => 'actions/upload-artifact@v4',
'with' => {
'name' => 'bundled-lockfile-${{ github.run_id }}-${{ matrix.engine.alias }}',
'retention-days' => 1,
'path' => 'Gemfile.lock'
}
},
{
'id' => 'set-matrix',
'run' => <<~BASH
Expand All @@ -129,16 +144,13 @@ namespace :github do
echo "${{ matrix.engine.alias }}=$matrix_json" >> $GITHUB_OUTPUT
BASH
},
{ 'run' => 'bundle cache' },
{ 'run' => 'bundle exec rake dependency:install' },
{
'uses' => 'actions/upload-artifact@v4',
'with' => {
'name' => 'bundled-dependencies-${{ github.run_id }}-${{ matrix.engine.alias }}',
'retention-days' => 1,
'path' => <<~STRING
Gemfile.lock
vendor/
STRING
'path' => '/usr/local/bundle'
}
},
]
Expand Down

0 comments on commit 5c0ef93

Please sign in to comment.