Skip to content

Commit

Permalink
ci: consolidate test/build
Browse files Browse the repository at this point in the history
This a better approach than trying to break it out.
  • Loading branch information
carlosmmatos committed Nov 19, 2024
1 parent 6986b69 commit 8231ac9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 62 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@ name: Build

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
branches: [main]
pull_request_target:
types: [labeled]

jobs:
build:
name: Build and Install Gem
if: |
github.event_name == 'push' ||
(github.event_name == 'pull_request_target' &&
github.event.label.name == 'ok-to-test')
runs-on: ubuntu-latest

strategy:
matrix:
ruby-version: ['3.0', '3.1', '3.2']
ruby-version: ["3.0", "3.1", "3.2"]
fail-fast: false

steps:
Expand All @@ -23,19 +26,17 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}

- name: Install dependencies
run: bundle install
bundler-cache: true

- name: Build gem
run: make build

- name: Upload gem
uses: actions/upload-artifact@v4
with:
name: crimson-gem-${{ matrix.ruby-version }}
path: crimson-falcon*.gem
if-no-files-found: error

- name: Install gem
run: make install

- name: Run tests
env:
FALCON_CLIENT_ID: ${{ secrets.FALCON_CLIENT_ID }}
FALCON_CLIENT_SECRET: ${{ secrets.FALCON_CLIENT_SECRET }}
FALCON_CLOUD: ${{ secrets.FALCON_CLOUD }}
run: bundle exec rspec
47 changes: 0 additions & 47 deletions .github/workflows/test.yml

This file was deleted.

0 comments on commit 8231ac9

Please sign in to comment.