Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(.github/actions): upgrade ubuntu #891

Merged
merged 22 commits into from
Jan 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ name: "CodeQL"

on:
push:
branches: [ master ]
branches: [ master, develop ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches: [ master, develop ]
schedule:
- cron: '22 11 * * 4'

Expand All @@ -39,11 +39,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -54,7 +54,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -68,4 +68,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
21 changes: 0 additions & 21 deletions .github/workflows/eslint.yaml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: ESLint

on:
push:
branches: [ master, develop, pre_*, ft_* ]
pull_request:
branches: [ master, develop, pre_*, ft_* ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
cache-dependency-path: 'src/pages/yarn.lock'
- name: Install modules
run: |
cd src/pages
npm i
- name: Run ESLint
run: |
cd src/pages
npx eslint --ext .js,.vue src/
22 changes: 12 additions & 10 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Python CI Check

on:
push:
branches: [ master, develop, pre_* ]
branches: [ master, develop, pre_*, ft_* ]
pull_request:
branches: [ master, develop, pre_* ]
branches: [ master, develop, pre_*, ft_* ]

jobs:
build:
Expand All @@ -14,21 +14,23 @@ jobs:
matrix:
python-version: [3.6.14]
poetry-version: [1.1.7]
os: [ubuntu-18.04]
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry==${{ matrix.poetry-version }}
- name: Export requirements.txt
run: poetry export -f requirements.txt --dev --without-hashes -o requirements.txt --no-ansi
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set up Poetry
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
cache: 'pip'
cache-dependency-path: 'requirements.txt'
- name: Install dependencies
run: poetry config virtualenvs.create false && poetry install
run: pip install -r requirements.txt -i https://pypi.org/simple/
- name: Lint with flake8
run: pflake8 src/ --config=pyproject.toml
- name: Lint with mypy
Expand Down
24 changes: 14 additions & 10 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Unittest

on:
push:
branches: [ master, develop, pre_* ]
branches: [ master, develop, pre_*, ft_* ]
pull_request:
branches: [ master, develop, pre_* ]
branches: [ master, develop, pre_*, ft_* ]

jobs:
build:
Expand All @@ -13,7 +13,7 @@ jobs:
matrix:
python-version: [3.6.14]
poetry-version: [1.1.7]
os: [ubuntu-18.04]
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}

env:
Expand All @@ -23,26 +23,30 @@ jobs:
DB_PORT: 3306

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: samin/[email protected]
with:
mysql version: '5.7'
mysql database: ${{ env.DB_DATABASE }}
mysql root password: ${{ env.DB_PASSWORD }}
mysql user: ${{ env.DB_USER }}
mysql password: ${{ env.DB_PASSWORD }}
- name: Install poetry
run: pipx install poetry==${{ matrix.poetry-version }}
- name: Export requirements.txt
run: |
cd src/api/
bash bin/export_requirements_txt.sh
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set up Poetry
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
cache: 'pip'
cache-dependency-path: 'src/api/requirements.txt'
- name: Install dependencies
run: |
cd src/api/
poetry config virtualenvs.create false && bash bin/install_ci_dependencies.sh
pip install -r requirements.txt -i https://pypi.org/simple/
- name: Run api unittest
env:
DJANGO_SETTINGS_MODULE: "bkuser_core.config.overlays.unittest"
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
name = "蓝鲸用户管理"
version = "2.3.3"
description = "project description file for ci"
authors = ["IMBlues <bluesedenyu@gmail.com>"]
authors = ["TencentBlueKing <contactus_bk@tencent.com>"]

[tool.poetry.dependencies]
python = "3.6.14"
python = "^3.8"
apigw-manager = "^1.0.3"

[tool.poetry.dev-dependencies]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ sed -i '/^--extra-index-url*/d' requirements.txt
sed -i '/gevent/d' requirements.txt
sed -i '/greenlet/d' requirements.txt
sed -i '/gunicorn/d' requirements.txt

pip install -r requirements.txt -i https://pypi.org/simple/
2 changes: 1 addition & 1 deletion src/api/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "bk-user-api"
version = "2.3.3"
description = "bk-user Api"
authors = ["IMBlues <bluesedenyu@gmail.com>"]
authors = ["TencentBlueKing <contactus_bk@tencent.com>"]

[tool.poetry.dependencies]
python = "3.6.14"
Expand Down
2 changes: 1 addition & 1 deletion src/login/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "bk-login"
version = "2.3.3"
description = "bk-login"
authors = ["IMBlues <bluesedenyu@gmail.com>"]
authors = ["TencentBlueKing <contactus_bk@tencent.com>"]

[tool.poetry.dependencies]
python = "3.6.14"
Expand Down
2 changes: 1 addition & 1 deletion src/saas/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "bk-user-saas"
version = "2.3.3"
description = "bk-user SaaS"
authors = ["IMBlues <bluesedenyu@gmail.com>"]
authors = ["TencentBlueKing <contactus_bk@tencent.com>"]

[tool.poetry.dependencies]
python = "3.6.14"
Expand Down