From 24708edf2bafc4926590cb7037093e79ce59fa30 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Sun, 23 Apr 2023 22:17:27 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20support:=20ci?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/python.yml | 38 ++++++++++++++++++++++++++++++++++++ .gitignore | 1 - main.py | 1 - poetry.lock | 4 ++-- pyproject.toml | 2 +- requirements.txt | 15 ++++++++++++++ 6 files changed, 56 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/python.yml create mode 100644 requirements.txt diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml new file mode 100644 index 0000000..ec7fc15 --- /dev/null +++ b/.github/workflows/python.yml @@ -0,0 +1,38 @@ +name: Fetch Wiki + +on: + push: + branches: + - 'main' + workflow_dispatch: ~ + +jobs: + Fetch-Wiki: + runs-on: ubuntu-latest + steps: + - name: Checkout source + uses: actions/checkout@master + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.9 + + - name: Install Dependencies + run: | + python -m pip install -r requirements.txt + + - name: Fetch Remote Files + run: | + python main.py + + - name: Commit changes + uses: EndBug/add-and-commit@v9 + with: + author_name: github-actions[bot] + author_email: github-actions[bot]@users.noreply.github.com + push: 'origin remote --force' + new_branch: 'remote' + message: ':sparkles: Fetch Wiki Changes' + add: | + 'data' diff --git a/.gitignore b/.gitignore index ec735ee..2dc53ca 100644 --- a/.gitignore +++ b/.gitignore @@ -158,4 +158,3 @@ cython_debug/ # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. .idea/ -data/ diff --git a/main.py b/main.py index 8c06e82..73c4179 100644 --- a/main.py +++ b/main.py @@ -1,5 +1,4 @@ import asyncio -import aiofiles from pathlib import Path from func.fetch_all import get_list from func.fetch_materials import fetch_materials, fetch_materials_infos, dump_materials diff --git a/poetry.lock b/poetry.lock index 5dda283..b50df80 100644 --- a/poetry.lock +++ b/poetry.lock @@ -406,5 +406,5 @@ files = [ [metadata] lock-version = "2.0" -python-versions = "^3.9" -content-hash = "9dcfe357a07b9d509acb71adb450b200fe5993525f6f5c20729cef412478d4f7" +python-versions = "^3.8" +content-hash = "92029b38a714a18b26df688fd37a5257054a4ba90bf34454f08fc851a82dda5c" diff --git a/pyproject.toml b/pyproject.toml index ae6726f..5df892b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ license = "AGPL 3.0+" readme = "README.md" [tool.poetry.dependencies] -python = "^3.9" +python = "^3.8" httpx = "^0.24.0" aiofiles = "^23.1.0" ujson = "^5.7.0" diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..4548b04 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,15 @@ +aenum==3.1.12 ; python_version >= "3.8" and python_version < "4.0" +aiofiles==23.1.0 ; python_version >= "3.8" and python_version < "4.0" +anyio==3.6.2 ; python_version >= "3.8" and python_version < "4.0" +beautifulsoup4==4.12.2 ; python_version >= "3.8" and python_version < "4.0" +certifi==2022.12.7 ; python_version >= "3.8" and python_version < "4.0" +h11==0.14.0 ; python_version >= "3.8" and python_version < "4.0" +httpcore==0.17.0 ; python_version >= "3.8" and python_version < "4.0" +httpx==0.24.0 ; python_version >= "3.8" and python_version < "4.0" +idna==3.4 ; python_version >= "3.8" and python_version < "4.0" +lxml==4.9.2 ; python_version >= "3.8" and python_version < "4.0" +pydantic==1.10.7 ; python_version >= "3.8" and python_version < "4.0" +sniffio==1.3.0 ; python_version >= "3.8" and python_version < "4.0" +soupsieve==2.4.1 ; python_version >= "3.8" and python_version < "4.0" +typing-extensions==4.5.0 ; python_version >= "3.8" and python_version < "4.0" +ujson==5.7.0 ; python_version >= "3.8" and python_version < "4.0"