[lxc-devel] [pylxd/master] run lint as a separate job
albertodonato on Github
lxc-bot at linuxcontainers.org
Wed Dec 9 11:43:14 UTC 2020
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 362 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20201209/26af3d8a/attachment-0001.bin>
-------------- next part --------------
From e850c042ad84fc5d5982605b83da1df604bd5690 Mon Sep 17 00:00:00 2001
From: Alberto Donato <alberto.donato at canonical.com>
Date: Wed, 9 Dec 2020 12:41:31 +0100
Subject: [PATCH] run lint as a separate job
Signed-off-by: Alberto Donato <alberto.donato at canonical.com>
---
.github/workflows/{unittest.yml => ci.yml} | 41 +++++++++++++---------
1 file changed, 24 insertions(+), 17 deletions(-)
rename .github/workflows/{unittest.yml => ci.yml} (55%)
diff --git a/.github/workflows/unittest.yml b/.github/workflows/ci.yml
similarity index 55%
rename from .github/workflows/unittest.yml
rename to .github/workflows/ci.yml
index 13318056..f3cee93e 100644
--- a/.github/workflows/unittest.yml
+++ b/.github/workflows/ci.yml
@@ -1,4 +1,4 @@
-name: Unit tests
+name: CI tests
on:
push:
@@ -9,7 +9,26 @@ on:
- master
jobs:
- run:
+ lint:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Repository checkout
+ uses: actions/checkout at v2
+
+ - name: Set up Python
+ uses: actions/setup-python at v2
+ with:
+ python-version: "3.6"
+
+ - name: Install dependencies
+ run: |
+ pip install --upgrade pip tox
+
+ - name: Lint
+ run: |
+ tox -e lint
+
+ test:
runs-on: ubuntu-latest
strategy:
matrix:
@@ -21,27 +40,15 @@ jobs:
- name: Repository checkout
uses: actions/checkout at v2
- - name: Set up Python ${{ matrix.python-version }}
+ - name: Set up Python
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
+ pip install --upgrade pip tox codecov
+
- name: Test
run: |
tox -e py
More information about the lxc-devel
mailing list