From b23ce280f414a84e28adcd0f8669d050077b11df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20=C3=85lund?= Date: Sat, 7 Mar 2020 23:04:16 +0100 Subject: [PATCH 1/5] Fix GitHub actions for frontend --- .github/workflows/frontend.yml | 48 ++++++++++++++++---------------- .github/workflows/inventory.yml | 38 ++++++++++++------------- .github/workflows/scaffolder.yml | 38 ++++++++++++------------- 3 files changed, 62 insertions(+), 62 deletions(-) diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 3a9a8d52a6..d35dbef333 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -3,8 +3,8 @@ name: Frontend CI on: push: paths: - - 'frontend/**' - - '.github/workflows/frontend.yml' + - '*' + - '.github/workflows/frontend.yml' jobs: build: @@ -15,25 +15,25 @@ jobs: node-version: [12.x] steps: - - name: checkout code - uses: actions/checkout@v1 - - name: get yarn cache - id: yarn-cache - run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v1 - with: - path: ${{ steps.yarn-cache.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - name: use node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: yarn install, build, and test - run: | - yarn install - yarn build - yarn test - env: - CI: true + - name: checkout code + uses: actions/checkout@v1 + - name: get yarn cache + id: yarn-cache + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v1 + with: + path: ${{ steps.yarn-cache.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: use node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: yarn install, build, and test + run: | + yarn install + yarn build + yarn test + env: + CI: true diff --git a/.github/workflows/inventory.yml b/.github/workflows/inventory.yml index 79d0dfb59a..a16c59bc7c 100644 --- a/.github/workflows/inventory.yml +++ b/.github/workflows/inventory.yml @@ -3,27 +3,27 @@ name: Inventory CI on: push: paths: - - 'backend/inventory/**' - - '.github/workflows/inventory.yml' + - 'backend/inventory/**' + - '.github/workflows/inventory.yml' jobs: build: runs-on: ubuntu-latest steps: - - name: Set up Go - uses: actions/setup-go@v1 - with: - go-version: 1.12 - - name: checkout code - uses: actions/checkout@v1 - - name: setup env - run: | - echo "::set-env name=GOPATH::$(go env GOPATH)" - echo "::add-path::$(go env GOPATH)/bin" - shell: bash - - name: build - run: go build -v ./... - working-directory: ./backend/inventory - - name: test - run: go test ./... -short - working-directory: ./backend/inventory \ No newline at end of file + - name: Set up Go + uses: actions/setup-go@v1 + with: + go-version: 1.12 + - name: checkout code + uses: actions/checkout@v1 + - name: setup env + run: | + echo "::set-env name=GOPATH::$(go env GOPATH)" + echo "::add-path::$(go env GOPATH)/bin" + shell: bash + - name: build + run: go build -v ./... + working-directory: ./backend/inventory + - name: test + run: go test ./... -short + working-directory: ./backend/inventory diff --git a/.github/workflows/scaffolder.yml b/.github/workflows/scaffolder.yml index 055fb109d5..1dfef9cd38 100644 --- a/.github/workflows/scaffolder.yml +++ b/.github/workflows/scaffolder.yml @@ -3,27 +3,27 @@ name: Scaffolder CI on: push: paths: - - 'backend/scaffolder/**' - - '.github/workflows/scaffolder.yml' + - 'backend/scaffolder/**' + - '.github/workflows/scaffolder.yml' jobs: build: runs-on: ubuntu-latest steps: - - name: Set up Go - uses: actions/setup-go@v1 - with: - go-version: 1.12 - - name: checkout code - uses: actions/checkout@v1 - - name: setup env - run: | - echo "::set-env name=GOPATH::$(go env GOPATH)" - echo "::add-path::$(go env GOPATH)/bin" - shell: bash - - name: build - run: go build -v ./... - working-directory: ./backend/scaffolder - - name: test - run: go test ./... -short - working-directory: ./backend/scaffolder \ No newline at end of file + - name: Set up Go + uses: actions/setup-go@v1 + with: + go-version: 1.12 + - name: checkout code + uses: actions/checkout@v1 + - name: setup env + run: | + echo "::set-env name=GOPATH::$(go env GOPATH)" + echo "::add-path::$(go env GOPATH)/bin" + shell: bash + - name: build + run: go build -v ./... + working-directory: ./backend/scaffolder + - name: test + run: go test ./... -short + working-directory: ./backend/scaffolder From 623f705a92446d75bcf3718aaabc18e6b4dbd5ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20=C3=85lund?= Date: Sat, 7 Mar 2020 23:08:06 +0100 Subject: [PATCH 2/5] ignore backends --- .github/workflows/frontend.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index d35dbef333..a30851a544 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -5,6 +5,9 @@ on: paths: - '*' - '.github/workflows/frontend.yml' + paths-ignore: + - 'backend/inventory/**' + - 'backend/scaffolder/**' jobs: build: From 5858156c7d13ac45d4c0b12a19d6ecc6b6927037 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20=C3=85lund?= Date: Sat, 7 Mar 2020 23:09:31 +0100 Subject: [PATCH 3/5] ignore try two --- .github/workflows/frontend.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index a30851a544..5c6acfc2b8 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -5,6 +5,8 @@ on: paths: - '*' - '.github/workflows/frontend.yml' +on: + push: paths-ignore: - 'backend/inventory/**' - 'backend/scaffolder/**' From d81267edaeb8d3e7ae0d3915553cb7900de57dfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20=C3=85lund?= Date: Sat, 7 Mar 2020 23:10:27 +0100 Subject: [PATCH 4/5] rm ignores --- .github/workflows/frontend.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 5c6acfc2b8..d35dbef333 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -5,11 +5,6 @@ on: paths: - '*' - '.github/workflows/frontend.yml' -on: - push: - paths-ignore: - - 'backend/inventory/**' - - 'backend/scaffolder/**' jobs: build: From 5ce9edeb61dc42c39aa795021eb00f92762ed930 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20=C3=85lund?= Date: Sat, 7 Mar 2020 23:23:51 +0100 Subject: [PATCH 5/5] Exclude backends properly --- .github/workflows/frontend.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index d35dbef333..515b18cbec 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -5,6 +5,8 @@ on: paths: - '*' - '.github/workflows/frontend.yml' + - '!backend/inventory/**' + - '!backend/scaffolder/**' jobs: build: