Skip to content

Instantly share code, notes, and snippets.

@y-yagi
Last active November 10, 2019 23:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save y-yagi/cd5f0ae135379173111cafaa182a772b to your computer and use it in GitHub Desktop.
Save y-yagi/cd5f0ae135379173111cafaa182a772b to your computer and use it in GitHub Desktop.

GitHub Actions

  • GitHub Actions
  • GitHub公式のサービス
  • 現行のサービスはv2と呼ばれているもの(まだbeta)
    • 去年話題になっていたのはv1で、実質別物
    • About GitHub Actions
    • 設定ファイルの書き方も全然違う
    • "GitHub Actions"でググると古い情報が出るので気をつけてね

概要

  • バックエンドは Azure Pipeline(らしい)
  • デフォルトで並列実行可能(20までいけるはず)
  • OSが用意されており、設定ファイルに記述した処理がそのOS上で実行される
  • OSはLinux(Ubuntu)、macOS、Windowsが提供されている
  • 料金はpublic repositoriesだと無料
    • Privateは一定時間まで無料。詳細
  • WindowsとmacOSが使えるので、IEとSafariのテストをする、みたいなことも出来る

記載例

  • JSのテストを各OSで実行する場合の例。
on: push
jobs:
  test:
    strategy:
      matrix:
        platform: [ubuntu-latest, macos-latest, windows-latest]
    runs-on: ${{ matrix.platform }}
    steps:
    - uses: actions/checkout@master
    - uses: actions/setup-node@master
      with:
        version: 12
    - run: npm install-ci-test
    - uses:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment