Skip to content

Commit

Permalink
Build before test (#60)
Browse files Browse the repository at this point in the history
* Build before test

* Use matrix
  • Loading branch information
ludeeus authored Oct 25, 2020
1 parent 26eee50 commit 16e5173
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 12 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,27 @@ env:
GIT_TAG_NAME: dev

jobs:
init:
name: Initialize build
runs-on: ubuntu-latest
outputs:
architectures: ${{ steps.info.outputs.architectures }}
steps:
- name: Checkout the repository
uses: actions/checkout@v2

- name: Get information
id: info
uses: home-assistant/actions/helpers/info@master

publish:
name: Publish
name: Publish builder
needs: init
runs-on: ubuntu-latest
strategy:
fail-fast: False
matrix:
architecture:
- aarch64
- amd64
- armv7
architecture: ${{ fromJson(needs.init.outputs.architectures) }}
steps:
- name: Checkout the repository
uses: actions/checkout@v2
Expand Down
34 changes: 27 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,45 @@ on:
pull_request:

jobs:
init:
name: Initialize build
runs-on: ubuntu-latest
outputs:
architectures: ${{ steps.info.outputs.architectures }}
steps:
- name: Checkout the repository
uses: actions/checkout@v2

- name: Get information
id: info
uses: home-assistant/actions/helpers/info@master

build:
name: Test action build
needs: init
runs-on: ubuntu-latest
strategy:
fail-fast: False
matrix:
architecture:
- aarch64
- amd64
- armv7
architecture: ${{ fromJson(needs.init.outputs.architectures) }}
steps:
- name: Checkout the repository
uses: actions/checkout@v2

- name: Test builder
uses: ./ # This is self-refrencing
- name: Build the builder
uses: home-assistant/builder@master
with:
args: |
--test \
--amd64 \
--target /data \
--generic latest
- name: Test ${{ matrix.architecture }} builder
uses: ./
with:
args: |
--test \
--${{ matrix.architecture }} \
--target /data \
--generic ${{ github.sha }}
--generic ${{ github.sha }}

0 comments on commit 16e5173

Please sign in to comment.