diff --git a/.github/workflows/cli_deploy.yml b/.github/workflows/cli_deploy.yml index afa28ba..9e25888 100644 --- a/.github/workflows/cli_deploy.yml +++ b/.github/workflows/cli_deploy.yml @@ -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" diff --git a/.github/workflows/cli_tests.yml b/.github/workflows/cli_tests.yml index f382d3d..69bbfb1 100644 --- a/.github/workflows/cli_tests.yml +++ b/.github/workflows/cli_tests.yml @@ -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' @@ -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