From 1060d8495f7ffcee0448ade3037081c937a5b444 Mon Sep 17 00:00:00 2001 From: Hidetake Iwata Date: Sun, 25 Apr 2021 12:53:02 +0900 Subject: [PATCH] Update hello-world.yaml --- .github/workflows/hello-world.yaml | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/.github/workflows/hello-world.yaml b/.github/workflows/hello-world.yaml index c82b87d4..a18cb9fd 100644 --- a/.github/workflows/hello-world.yaml +++ b/.github/workflows/hello-world.yaml @@ -17,6 +17,9 @@ on: jobs: test: runs-on: ubuntu-latest + defaults: + run: + working-directory: hello-world steps: - uses: actions/checkout@v2 - id: yarn-cache-dir @@ -28,17 +31,30 @@ jobs: restore-keys: | ${{ runner.os }}-yarn- - run: yarn - working-directory: hello-world - run: yarn format-check - working-directory: hello-world - run: yarn lint - working-directory: hello-world - run: yarn test + + build: + runs-on: ubuntu-latest + defaults: + run: working-directory: hello-world + steps: + - uses: actions/checkout@v2 + with: + ref: ${{ github.head_ref }} + - id: yarn-cache-dir + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v2 + with: + path: ${{ steps.yarn-cache-dir.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - run: yarn - run: yarn build - working-directory: hello-world - run: yarn package - working-directory: hello-world - uses: ./.github/actions/update-generated-files e2e-test: