From 699effbf240488a967ceec2d8f7a9077e3709edf Mon Sep 17 00:00:00 2001 From: Kohei Watanabe Date: Tue, 27 Jul 2021 22:17:33 +0900 Subject: [PATCH] =?UTF-8?q?GitHub=20Actions=E3=81=AE=E3=82=B3=E3=83=BC?= =?UTF-8?q?=E3=83=89=E3=81=AE=E4=BE=8B=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 8cea107..b7ace08 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,28 @@ CI/CD を実現するための環境 --- +## GitHub Actions による自動テストの例 + +`.github/workflows/test.yml` + +```yml +name: test +on: push +jobs: + main: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: { node-version: lts/*, cache: npm } + - run: npm ci + - run: npm test +``` + +`git push`するたびに繰り返し GitHub が実行環境を構築し自動的にテストを実行 + +--- + ## テストフレームワーク テストをサポートするための一連のツール