aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAliaksei Urbanski <aliaksei.urbanski@gmail.com>2023-11-08 18:01:37 +0300
committerSam James <sam@gentoo.org>2023-11-13 06:20:51 +0000
commit6b3b62b5777677930b3ff9e00835f6b1c1e914aa (patch)
treef0e22808ba6b832fe9585a7d493ee6d5c2e9b6a8 /.github
parentAdd basic rendering tests with tox (diff)
downloadpambase-6b3b62b5777677930b3ff9e00835f6b1c1e914aa.tar.gz
pambase-6b3b62b5777677930b3ff9e00835f6b1c1e914aa.tar.bz2
pambase-6b3b62b5777677930b3ff9e00835f6b1c1e914aa.zip
Add a GitHub Actions workflow for tests
These changes enable tests on the GitHub side. The implementation relies on Official Gentoo Docker images, since I believe it's a better way to test Gentoo-specific packages. Useful links: * https://www.gentoo.org/news/2020/07/04/official-docker.html * https://github.com/gentoo/gentoo-docker-images * https://github.com/docker/build-push-action * https://docs.docker.com/build/ci/github-actions/cache/ Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/tests.yml26
1 files changed, 26 insertions, 0 deletions
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
new file mode 100644
index 0000000..652d733
--- /dev/null
+++ b/.github/workflows/tests.yml
@@ -0,0 +1,26 @@
+name: Tests
+
+on:
+ push:
+ pull_request:
+ branches:
+ - master
+
+jobs:
+ tests:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v3
+ - name: Build the Docker image
+ uses: docker/build-push-action@v5
+ with:
+ context: .
+ cache-from: type=gha
+ cache-to: type=gha,mode=max
+ load: true
+ tags: pambase
+ - name: Run tox
+ run: docker run pambase