Skip to content

Commit

Permalink
Fix deploy preflight and add test matrix for mac/ubuntu (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
trevor-e authored Nov 19, 2024
1 parent 9fc8ab7 commit fa12563
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/cli_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,15 @@ jobs:
bundle install
- name: Build and install gem locally
run: bundle exec rake install
run: |
bundle exec rake build
gem install pkg/*.gem
- name: Test emerge CLI
run: |
export PATH="$(ruby -e 'puts Gem.user_dir')/bin:$PATH"
# Update PATH to include both system and user gem paths
export PATH="$(ruby -e 'puts Gem.user_dir')/bin:$(ruby -e 'puts Gem.dir')/bin:$PATH"
OUTPUT=$(emerge -h 2>&1 || true)
echo "$OUTPUT"
Expand Down
22 changes: 13 additions & 9 deletions .github/workflows/cli_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ on:
branches: [main]

jobs:
rubocop:
name: Rubocop
lint:
name: Lint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Ruby and install dependencies
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.2'
Expand All @@ -23,16 +22,21 @@ jobs:
- name: Run Rubocop
run: bundle exec rubocop --parallel

minitest:
name: Minitest
runs-on: ubuntu-latest
test:
name: Test
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
ruby-version: ['3.2.2']
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- name: Set up Ruby and install dependencies
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.2'
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true

- name: Run Minitest tests
Expand Down

0 comments on commit fa12563

Please sign in to comment.