1
0
mirror of https://github.com/peeringdb/peeringdb.git synced 2024-05-11 05:55:09 +00:00

update build (#1421)

* update badges

* poetry lock

* bump python to 3.11

* update pre-commit and linting action

* disable flake out from new version
This commit is contained in:
Matt Griswold
2023-08-11 11:36:16 -05:00
committed by GitHub
parent b88bc33d35
commit 4244231fa5
6 changed files with 324 additions and 536 deletions

View File

@ -3,39 +3,15 @@ name: tests
on: [push, pull_request]
jobs:
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Ensure cache is healthy
if: steps.cache.outputs.cache-hit == 'true'
shell: bash
run: timeout 10s poetry run pip --version || rm -rf .venv
# install dependencies if cache does not exist
- name: Check cache and install dependencies
run: poetry install --no-interaction --no-root
- name: Install virtualenv from poetry
uses: 20c/workflows/poetry@v1
- name: Run linters
run: |
poetry run isort .
poetry run black . --check
# poetry run flake8 peeringdb_server
poetry run pre-commit run --all-files
test:
needs: linting
runs-on: ubuntu-latest

View File

@ -5,7 +5,7 @@ exclude: |
)$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
rev: v4.4.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
@ -32,10 +32,10 @@ repos:
entry: poetry run black .
language: system
pass_filenames: false
- repo: local
hooks:
- id: system
name: flake8
entry: poetry run flake8 peeringdb_server
language: system
pass_filenames: false
# - repo: local
# hooks:
# - id: system
# name: flake8
# entry: poetry run flake8 peeringdb_server
# language: system
# pass_filenames: false

View File

@ -25,7 +25,7 @@ ARG run_deps=" \
libgcc \
"
FROM python:3.9-alpine as base
FROM python:3.11-alpine as base
ARG virtual_env=/srv/www.peeringdb.com/venv

View File

@ -1,8 +1,9 @@
# PeeringDB
[![Travis CI](https://img.shields.io/travis/peeringdb/peeringdb.svg?maxAge=3600)](https://travis-ci.org/peeringdb/peeringdb)
[![Codecov](https://img.shields.io/codecov/c/github/peeringdb/peeringdb/master.svg?maxAge=3600)](https://codecov.io/github/peeringdb/peeringdb)
[![tests](https://github.com/peeringdb/peeringdb/actions/workflows/tests.yml/badge.svg)](https://github.com/peeringdb/peeringdb/actions/workflows/tests.yml)
[![CodeQL](https://github.com/peeringdb/peeringdb/actions/workflows/codeql.yml/badge.svg)](https://github.com/peeringdb/peeringdb/actions/workflows/codeql.yml)
[![codecov](https://codecov.io/gh/peeringdb/peeringdb/branch/master/graph/badge.svg?token=zYAhZzltxV)](https://codecov.io/gh/peeringdb/peeringdb)
[PeeringDB](https://www.peeringdb.com/) provides a scalable way to publish

805
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
[tool.poetry]
name = "peeringdb_server"
version = "2.49.0-beta"
version = "2.49.0"
description = "source code for PeeringDB.com"
readme = "README.md"
repository = "https://github.com/peeringdb/peeringdb"