0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【Bruno】GitHub Actionsでコマンドを実行する方法

Last updated at Posted at 2025-08-24

プロジェクト構造

project/
├── .github/workflows/api-tests.yml
├── collections/
│   └── authentication/
├── environments/
│   ├── development.bru
│   └── ci.bru
└── bruno.json

GitHub Actionsワークフローの作成

.github/workflows/api-tests.ymlファイルを作成します。

name: API Tests

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  test:
    runs-on: ubuntu-latest
    
    steps:
    - name: Checkout code
      uses: actions/checkout@v4
      
    - name: Setup Node.js
      uses: actions/setup-node@v4
      with:
        node-version: '20'
        
    - name: Install Bruno CLI
      run: npm install -g @usebruno/cli
      
    - name: Run API Tests
      run: bru run --env ci --reporter-html results.html
      
    - name: Upload Test Results
      uses: actions/upload-artifact@v4
      with:
        name: test-results
        path: results.html

ワークフローの実行

  1. ファイルをコミット
git add .github/workflows/api-tests.yml
git commit -m "Add GitHub Actions workflow for API testing"
git push origin main
  1. 実行確認
  • GitHubリポジトリの「Actions」タブで実行状況を確認
  • 完了後、「Artifacts」からresults.htmlをダウンロードしてレポートを確認

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?