GitHub Actions (CI)に関して色々まとめる場所 (YAML版)
https://gyazo.com/2323934cd3685e1f748c7125f1964b8d
YAMLでplatform: [ubuntu-latest, macos-latest, windows-latest]などが指定できる 以前は.workflowという拡張子でHCLという記法だった matrixが使える
簡単な理解では、一つの変数対して複数値で動かしたいときに便利
例1: ${{ matrix.platform }}の部分は[ubuntu-latest, macos-latest, windows-latest]のそれぞれが展開されるように実行されると思われる。
code:ci.yml
on: push
jobs:
test:
strategy:
matrix:
runs-on: ${{ matrix.platform }}
例2: 以下だと複数のOSバージョンと複数のNode.jsバージョンを
code:yml
strategy:
matrix:
導入事例