Allow manually running tests #171
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: CI | |
# yamllint disable-line rule:truthy | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: "0 0 22 * *" | |
workflow_dispatch: | |
jobs: | |
smoketest: | |
name: Smoke test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Fix Checkout | |
run: | | |
git fetch --force --tags | |
- name: Run minimal test build | |
run: | | |
sudo apt-get update | |
make build-depends | |
make cpio | |
lint: | |
name: Code syntax | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Fix Checkout | |
run: | | |
git fetch --force --tags | |
- name: Install Dependancies | |
run: | | |
sudo apt-get update | |
make build-depends | |
- name: Run the lint tools | |
run: | | |
make shellcheck flake8 | |
builds: | |
needs: smoketest | |
name: Perform builds | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
arch: | |
- amd64 | |
- arm64 | |
- armhf | |
- i386 | |
- mipsel | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Fix Checkout | |
run: | | |
git fetch --force --tags | |
- name: Install Dependancies | |
run: | | |
sudo apt-get update | |
make build-depends | |
- name: Build | |
run: | | |
export CONFIG_DEBIAN_ARCH=${{ matrix.arch }} | |
make cpio | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: cpio | |
path: build/*.cpio | |
fulltests: | |
needs: builds | |
name: Perform full VM boot test | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
arch: | |
- i386 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Fix Checkout | |
run: | | |
git fetch --force --tags | |
- name: Install Dependancies | |
run: | | |
sudo apt-get update | |
make build-depends | |
- name: Fetch all Artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
path: build | |
- name: Full test | |
run: | | |
export CONFIG_DISABLE_KVM=yes | |
export CONFIG_DEBIAN_ARCH=${{ matrix.arch }} | |
make test | |
# TODO: | |
# - deploy the artifacts into a release object | |
# - cache the dpkg downloads |