Skip to content

Commit

Permalink
Add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
montjoie committed Nov 25, 2022
1 parent 5e0961f commit c94afce
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/docker-resolv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

docker run busybox nslookup github.com
if [ $? -eq 0 ]; then
echo "DEBUG: DNS query works in docker"
# exit 0
fi

sudo echo '
{
"dns": ["8.8.8.8"]
}' > /etc/docker/daemon.json

sudo service docker restart || exit $?
29 changes: 29 additions & 0 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: basic
on: # yamllint disable-line rule:truthy
push:
pull_request:

jobs:
check-lava-lab-gen:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: install lavacli
run: sudo apt-get -y install lavacli
- run: ./lavalab-gen.py boards-ci.yaml
- run: cat output/local/docker-compose.yml
- name: Verify DNS query in docker
run: sh .github/docker-resolv.sh
- name: Build lava-docker
run: cd output/local && docker-compose build
check-formats:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: install yamllint
run: sudo apt-get -y install yamllint
- name: verify yaml files
run: find -iname '*.yaml' | xargs yamllint
- name: verify yml files
run: find -iname '*.yml' | xargs yamllint
25 changes: 25 additions & 0 deletions boards-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
masters:
- name: masterci1
host: local
users:
- name: admin
token: tokenforci
password: passwordforci
superuser: true
staff: true
tokens:
- username: admin
token: dfjdfkfkdjfkdsjfslforci
description: no description
slaves:
- name: lab-ci-0
host: local
remote_master: masterci1
remote_user: admin
use_overlay_server: false
use_tftp: false

boards:
- name: qemu-01
type: qemu

0 comments on commit c94afce

Please sign in to comment.