[lxc-devel] [pylxd/master] configure github actions

albertodonato on Github lxc-bot at linuxcontainers.org
Wed Dec 9 07:35:06 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 339 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20201208/be066c26/attachment-0001.bin>
-------------- next part --------------
From 397bde20ca16ec8d1d786c095903a15db2e63f66 Mon Sep 17 00:00:00 2001
From: Alberto Donato <alberto.donato at canonical.com>
Date: Wed, 9 Dec 2020 08:34:13 +0100
Subject: [PATCH] configure github actions

---
 .github/workflows | 52 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)
 create mode 100644 .github/workflows

diff --git a/.github/workflows b/.github/workflows
new file mode 100644
index 00000000..defb80b0
--- /dev/null
+++ b/.github/workflows
@@ -0,0 +1,52 @@
+# -*- mode: yaml -*-
+
+name: PyLXD
+
+on:
+  push:
+    branches:
+      - main
+  pull_request:
+    branches:
+      - main
+
+jobs:
+  build:
+
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        python-version:
+          - "3.6"
+          - "3.7"
+          - "3.8"
+
+    steps:
+    - name: Repository checkout
+      uses: actions/checkout at v2
+
+    - name: Set up Python ${{ matrix.python-version }}
+      uses: actions/setup-python at v2
+      with:
+        python-version: ${{ matrix.python-version }}
+
+    - name: Cache packages
+      uses: actions/cache at v2
+      with:
+        path: ~/.cache/pip
+        # Look to see if there is a cache hit for the corresponding requirements file
+        key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
+      restore-keys: |
+        ${{ runner.os }}-pip-
+        ${{ runner.os }}-
+    - name: Install dependencies
+      run: |
+        pip install --upgrade pip
+        pip install tox codecov
+    - name: Lint
+      run: |
+        tox -e lint
+    - name: Test
+      run: |
+        tox -e py
+        codecov


More information about the lxc-devel mailing list