Skip to content
Closed

毓 #2839

Show file tree
Hide file tree
Changes from all commits
Commits
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
30 changes: 30 additions & 0 deletions .github/workflows/django.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Django CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

Check warning on line 10 in .github/workflows/django.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

excessive-permissions

django.yml:10: overly broad permissions: default permissions used due to no permissions: block

runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v4

Check failure on line 19 in .github/workflows/django.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 19 in .github/workflows/django.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

django.yml:19: unpinned action reference: action is not pinned to a hash (required by blanket policy)
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3

Check failure on line 21 in .github/workflows/django.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 21 in .github/workflows/django.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

django.yml:21: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Tests
run: |
python manage.py test
27 changes: 27 additions & 0 deletions .github/workflows/makefile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Makefile CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

Check warning on line 10 in .github/workflows/makefile.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

excessive-permissions

makefile.yml:10: overly broad permissions: default permissions used due to no permissions: block

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

Check failure on line 15 in .github/workflows/makefile.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 15 in .github/workflows/makefile.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

makefile.yml:15: unpinned action reference: action is not pinned to a hash (required by blanket policy)

- name: configure
run: ./configure

- name: Install dependencies
run: make

- name: Run check
run: make check

- name: Run distcheck
run: make distcheck
34 changes: 34 additions & 0 deletions .github/workflows/python-package-conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Python Package using Conda

on: [push]

jobs:
build-linux:

Check warning on line 6 in .github/workflows/python-package-conda.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

excessive-permissions

python-package-conda.yml:6: overly broad permissions: default permissions used due to no permissions: block
runs-on: ubuntu-latest
strategy:
max-parallel: 5

steps:
- uses: actions/checkout@v4

Check failure on line 12 in .github/workflows/python-package-conda.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 12 in .github/workflows/python-package-conda.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

python-package-conda.yml:12: unpinned action reference: action is not pinned to a hash (required by blanket policy)
- name: Set up Python 3.10
uses: actions/setup-python@v3

Check failure on line 14 in .github/workflows/python-package-conda.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 14 in .github/workflows/python-package-conda.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

python-package-conda.yml:14: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
python-version: '3.10'
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda env update --file environment.yml --name base
- name: Lint with flake8
run: |
conda install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
conda install pytest
pytest
70 changes: 70 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# This workflow will upload a Python Package to PyPI when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package

on:
release:
types: [published]

permissions:
contents: read

jobs:
release-build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

Check failure on line 23 in .github/workflows/python-publish.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 23 in .github/workflows/python-publish.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

python-publish.yml:23: unpinned action reference: action is not pinned to a hash (required by blanket policy)

- uses: actions/setup-python@v5

Check failure on line 25 in .github/workflows/python-publish.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 25 in .github/workflows/python-publish.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

python-publish.yml:25: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
python-version: "3.x"

- name: Build release distributions
run: |
# NOTE: put your own distribution build steps here.
python -m pip install build
python -m build
- name: Upload distributions
uses: actions/upload-artifact@v4

Check failure on line 36 in .github/workflows/python-publish.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 36 in .github/workflows/python-publish.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

python-publish.yml:36: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
name: release-dists
path: dist/

pypi-publish:
runs-on: ubuntu-latest
needs:
- release-build
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write

# Dedicated environments with protections for publishing are strongly recommended.
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
environment:
name: pypi
# OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
# url: https://pypi.org/p/YOURPROJECT
#
# ALTERNATIVE: if your GitHub Release name is the PyPI project version string
# ALTERNATIVE: exactly, uncomment the following line instead:
# url: https://pypi.org/project/YOURPROJECT/${{ github.event.release.name }}

steps:
- name: Retrieve release distributions
uses: actions/download-artifact@v4

Check failure on line 62 in .github/workflows/python-publish.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 62 in .github/workflows/python-publish.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

python-publish.yml:62: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
name: release-dists
path: dist/

- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

Check failure on line 68 in .github/workflows/python-publish.yml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

python-publish.yml:68: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
packages-dir: dist/
Loading