From 15083799a2140c96ccde629724f8627bd09a5776 Mon Sep 17 00:00:00 2001 From: Birkhoff Lee Date: Wed, 21 Apr 2021 17:17:47 +0800 Subject: [PATCH 1/5] chore: remove obsolete drone config Signed-off-by: Birkhoff Lee --- .drone.yml | 66 ------------------------------------------------------ 1 file changed, 66 deletions(-) delete mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index e728ab0b..00000000 --- a/.drone.yml +++ /dev/null @@ -1,66 +0,0 @@ ---- -kind: pipeline -name: default - -steps: -- name: test - image: python:3.7 - commands: - - pip install yapf - - yapf . -rd - - pip install -r requirements.txt - - pip install -r tests/requirements.txt - - pytest - -trigger: - branch: - exclude: - - master - - develop ---- -kind: pipeline -type: ssh -name: dev-deploy - -server: - host: s2.noj.tw - user: development - ssh_key: - from_secret: dev-ssh_key - -steps: -- name: deploy - commands: - - cd /home/development/Normal-OJ/Back-End - - git pull - - docker-compose up --build --no-start web - - docker-compose restart web - -trigger: - event: - - push - branch: - - develop ---- -kind: pipeline -type: ssh -name: prod-deploy - -server: - host: noj.tw - user: development - ssh_key: - from_secret: prod-ssh_key - -steps: -- name: deploy - commands: - - cd /home/development/Normal-OJ/Back-End - - git pull - - docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d --build web - -trigger: - event: - - push - branch: - - master \ No newline at end of file From b64584834a40ec00e449cb641e1ea9d3450f68de Mon Sep 17 00:00:00 2001 From: Birkhoff Lee Date: Wed, 21 Apr 2021 17:18:36 +0800 Subject: [PATCH 2/5] chore(README): remove API reference The link does not work anymore Signed-off-by: Birkhoff Lee --- README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/README.md b/README.md index 90002ca3..5af12b68 100644 --- a/README.md +++ b/README.md @@ -1,5 +1 @@ -# Back-End - -## API Reference - -https://normal-oj.github.io/Back-End +# Normal OJ Backend From 7640830005354830317dc4ff76143d50b6af9fdd Mon Sep 17 00:00:00 2001 From: Birkhoff Lee Date: Wed, 21 Apr 2021 17:27:23 +0800 Subject: [PATCH 3/5] chore(ci): run yapf & pytest on each push Signed-off-by: Birkhoff Lee --- .gitlab-ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..25fcc55c --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,11 @@ +stages: + - test + +test: + stage: test + image: python:3.8-buster + script: + - pip install --upgrade pip + - pip install -r requirements.txt + - yapf . -r + - pytest From d920af823b47ec64ee1c9c40fba6be5f56db87e5 Mon Sep 17 00:00:00 2001 From: Birkhoff Lee Date: Wed, 21 Apr 2021 20:46:19 +0800 Subject: [PATCH 4/5] chore(ci): fix requirements.txt path Signed-off-by: Birkhoff Lee --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 25fcc55c..2c65c49d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,6 @@ test: image: python:3.8-buster script: - pip install --upgrade pip - - pip install -r requirements.txt + - pip install -r requirements/dev.txt - yapf . -r - pytest From 495399013dd63be3d5e835bc7a38a270f8926387 Mon Sep 17 00:00:00 2001 From: Birkhoff Lee Date: Wed, 21 Apr 2021 20:57:06 +0800 Subject: [PATCH 5/5] chore(github): remove obsolete code Signed-off-by: Birkhoff Lee --- .github/CODEOWNERS | 3 -- .../continuous-integration-workflow.yml | 30 ------------------- 2 files changed, 33 deletions(-) delete mode 100644 .github/CODEOWNERS delete mode 100644 .github/workflows/continuous-integration-workflow.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index d0382479..00000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1,3 +0,0 @@ -* @AlaRduTP -* @skps2010 -* @as535364 diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml deleted file mode 100644 index adb7803c..00000000 --- a/.github/workflows/continuous-integration-workflow.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: CI - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v1 - - name: Set up Python 3.8 - uses: actions/setup-python@v1 - with: - python-version: 3.8 - - name: Upgrade pip - run: | - python -m pip install --upgrade pip - - name: Install dev dependencies - run: | - pip install -r requirements/dev.txt - # - name: Install bs detection requirements - # run: | - # sudo apt install cppcheck - - name: YAPF - run: | - yapf . -rd - - name: Unit test - run: | - pytest