From a6a8a5eb646f3e2bff6122590b1b0646837cb9d8 Mon Sep 17 00:00:00 2001 From: ehco1996 Date: Fri, 30 Apr 2021 07:57:03 +0800 Subject: [PATCH] fix: fix ci --- .github/workflows/check.yml | 23 ++++++++++++++++++++++- .github/workflows/code.yml | 2 ++ README.md | 6 +++++- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 92fbf0c2d0..82dbd1a3a1 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -8,12 +8,33 @@ jobs: lint: name: Lint runs-on: ubuntu-18.04 + strategy: + matrix: + python-version: [3.8] steps: - name: Check out code uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Display Python version + run: python -c "import sys; print(sys.version)" + + - uses: Gr1N/setup-poetry@v4 + - uses: actions/cache@v2 + with: + path: ~/.cache/pypoetry/virtualenvs + key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} + - run: poetry --version + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install poetry + make setup - name: run make check - uses: golangci/golangci-lint-action@v2 env: DJANGO_ENV: ci run: make check diff --git a/.github/workflows/code.yml b/.github/workflows/code.yml index 1fe8159973..c89d40040b 100644 --- a/.github/workflows/code.yml +++ b/.github/workflows/code.yml @@ -4,6 +4,8 @@ on: branches: - dev - master + repository_dispatch: + types: [Check Lint] jobs: build-code: runs-on: ubuntu-latest diff --git a/README.md b/README.md index dacc86f276..aedc81bfc2 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,12 @@ 用diango开发的全新的shadowsocks网络面板 [![CodeFactor](https://www.codefactor.io/repository/github/ehco1996/django-sspanel/badge)](https://www.codefactor.io/repository/github/ehco1996/django-sspanel) + [![simpleui](https://img.shields.io/badge/developing%20with-Simpleui-2077ff.svg)](https://github.com/newpanjing/simpleui) -![example workflow](https://github.com/Ehco1996/django-sspanel/actions/workflows/code.yml/badge.svg) + +![check](https://github.com/Ehco1996/django-sspanel/actions/workflows/check.yml/badge.svg) + +![code](https://github.com/Ehco1996/django-sspanel/actions/workflows/code.yml/badge.svg) * Telegram group : [invite link](https://t.me/Ehcobreakwa11)