Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
holmanb committed Mar 31, 2024
1 parent 53c2a06 commit e89cc8b
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/alpine-unittests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@

name: Unittests on alpine

on:
pull_request:
branches-ignore:
- 'ubuntu/**'
push:
branches:
- main

concurrency:
group: 'ci-${{ github.workflow }}-${{ github.ref }}'
cancel-in-progress: true

defaults:
run:
shell: sh -ex {0}

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install incus
run: |
curl https://pkgs.zabbly.com/get/incus-stable | sudo sh -x
- name: Reset the firewall
run: |
sudo iptables -I DOCKER-USER -j ACCEPT
- name: Init incus
run: |
sudo incus admin init --auto
sudo ip link set incusbr0 up
- name: Create alpine container
run: |
ip l
ip a
ip r
sudo sg incus-admin -c 'incus launch images:alpine/edge alpine'
sudo sg incus-admin -c 'incus exec alpine -- ip a'
sudo sg incus-admin -c 'incus exec alpine -- ip l'
sudo sg incus-admin -c 'incus exec alpine -- ip r'
sudo sg incus-admin -c 'incus exec alpine -- ping -c 1 8.8.8.8 || true'
sudo sg incus-admin -c 'incus exec alpine -- ping -c 1 www.google.com || true'
sudo sg incus-admin -c 'incus exec alpine -- ping -c 1 dl-cdn.alpinelinux.org || true'
sudo sg incus-admin -c 'incus exec alpine -- nslookup www.google.com || true'
sudo sg incus-admin -c 'incus exec alpine -- ping -c 1 dl-cdn.alpinelinux.org || true'
sudo sg incus-admin -c 'incus exec alpine -- apk add py3-tox git || true'
sudo sg incus-admin -c "incus exec alpine -- git clone --branch ${GITHUB_REF_NAME} https://github.com/${GITHUB_REPOSITORY}.git || true"
sudo sg incus-admin -c 'incus exec alpine -- tox -e py3 --root ~/cloud-init || true'

0 comments on commit e89cc8b

Please sign in to comment.