Skip to content

Commit 298d0cf

Browse files
committed
TODO/WIP/pending 👷 Migrate to GitHub Actions
Also bump a few versions to get the CI to pass. In future iterations we could bump more dependencies. TODO: - explain why we removed dependencies from the Makefile
1 parent 8c75846 commit 298d0cf

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

.github/workflows/tests.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
linux-build:
9+
runs-on: ubuntu-latest
10+
name: Linux Build
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Set up Docker
16+
uses: docker/setup-buildx-action@v3
17+
18+
- name: Build Docker image
19+
run: |
20+
docker build --tag=zbarcam-linux \
21+
--file=dockerfiles/Dockerfile-linux \
22+
--build-arg CI .
23+
24+
- name: Setup virtual frame buffer
25+
run: |
26+
sudo apt-get update
27+
sudo apt-get install -y xvfb
28+
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
29+
echo "DISPLAY=:99" >> $GITHUB_ENV
30+
31+
- name: Run tests
32+
run: |
33+
docker run --env-file dockerfiles/env.list \
34+
-v /tmp/.X11-unix:/tmp/.X11-unix \
35+
-e DISPLAY=$DISPLAY \
36+
zbarcam-linux make test
37+
timeout-minutes: 30
38+
39+
android-build:
40+
runs-on: ubuntu-latest
41+
name: Android Build
42+
43+
steps:
44+
- uses: actions/checkout@v4
45+
46+
- name: Set up Docker
47+
uses: docker/setup-buildx-action@v3
48+
49+
- name: Build Docker image
50+
run: |
51+
docker build --tag=zbarcam-android \
52+
--file=dockerfiles/Dockerfile-android \
53+
--build-arg CI .
54+
55+
- name: Build Android app
56+
run: |
57+
docker run --env-file dockerfiles/env.list \
58+
zbarcam-android buildozer android debug
59+
timeout-minutes: 30

0 commit comments

Comments
 (0)