From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 65A9F158013 for ; Tue, 21 Sep 2021 21:01:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 37261E07FE; Tue, 21 Sep 2021 21:01:50 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1EA1DE07FE for ; Tue, 21 Sep 2021 21:01:50 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C07D2342FEC for ; Tue, 21 Sep 2021 21:01:48 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 05DCDCF for ; Tue, 21 Sep 2021 21:01:47 +0000 (UTC) From: "Matt Turner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" Message-ID: <1632257964.0fa55427d252c5e41d1e3cbd28a86f530197eb02.mattst88@gentoo> Subject: [gentoo-commits] proj/gentoolkit:master commit in: .github/workflows/ X-VCS-Repository: proj/gentoolkit X-VCS-Files: .github/workflows/ci.yml X-VCS-Directories: .github/workflows/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: 0fa55427d252c5e41d1e3cbd28a86f530197eb02 X-VCS-Branch: master Date: Tue, 21 Sep 2021 21:01:47 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 69713753-2690-452b-a9ce-eb3dc36473f4 X-Archives-Hash: 75a848b3bf07ebf8f1c4be8eb6be56a2 commit: 0fa55427d252c5e41d1e3cbd28a86f530197eb02 Author: Wolfgang E. Sanyer gmail com> AuthorDate: Tue Sep 21 01:57:58 2021 +0000 Commit: Matt Turner gentoo org> CommitDate: Tue Sep 21 20:59:24 2021 +0000 URL: https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=0fa55427 Add github action unit-test CI Closes: https://github.com/gentoo/gentoolkit/pull/16 Signed-off-by: Wolfgang E. Sanyer gmail.com> Signed-off-by: Matt Turner gentoo.org> .github/workflows/ci.yml | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..60b8205 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,44 @@ +name: Unit tests + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.7' + - '3.8' + - '3.9' + - '3.10.0-alpha - 3.10.0' + - 'pypy-3.7' + + env: + PORTAGE_VERSION: "3.0.20" + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install portage + run: | + mkdir portage + wget -qO - "https://github.com/gentoo/portage/archive/portage-${PORTAGE_VERSION}.tar.gz" | tar xz -C portage --strip-components=1 + sudo groupadd -g 250 portage + sudo useradd -g portage -d /var/tmp/portage -s /bin/false -u 250 portage + - name: Setup gentoo env (required by portage) + run: | + sudo mkdir -p /var/db/repos/gentoo /etc/portage /var/cache/distfiles + wget -qO - "https://github.com/gentoo-mirror/gentoo/archive/master.tar.gz" | sudo tar xz -C /var/db/repos/gentoo --strip-components=1 + sudo wget "https://www.gentoo.org/dtd/metadata.dtd" -O /var/cache/distfiles/metadata.dtd + sudo wget "https://gitweb.gentoo.org/proj/portage.git/plain/cnf/repos.conf" -O /etc/portage/repos.conf + sudo ln -s /var/db/repos/gentoo/profiles/default/linux/amd64/17.1/systemd /etc/portage/make.profile + - name: Run tests + run: | + export PYTHONPATH="${PWD}/portage/lib"${PYTHONPATH:+:}${PYTHONPATH} + export PATH="${PWD}/portage/bin":${PATH} + python setup.py test