From 664451087160148c012e416b783a094dfe2331ad Mon Sep 17 00:00:00 2001 From: Arpit Jain Date: Wed, 26 Apr 2023 05:23:13 +0900 Subject: [PATCH 1/4] Added CodeQL code --- .github/workflows/codeql.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..307c586 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,30 @@ +jobs: + analyze: + name: Analyze + permissions: + actions: read + contents: read + security-events: write + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + queries: security-and-quality + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + strategy: + fail-fast: false + matrix: + language: + - python +name: CodeQL +'on': + push: + branches: + - master From 09d48f0375b560f390367bd516f936b0a02f7128 Mon Sep 17 00:00:00 2001 From: Arpit Jain Date: Wed, 26 Apr 2023 16:13:17 +0900 Subject: [PATCH 2/4] Added CodeQL code --- .github/workflows/ci.yml | 44 -------------------------------------- .github/workflows/dev.yml | 44 -------------------------------------- .github/workflows/main.yml | 43 ------------------------------------- 3 files changed, 131 deletions(-) delete mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/dev.yml delete mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 56e4097..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: CI - -# Run on push only for dev/sandbox -# Otherwise it may trigger concurrently `push & pull_request` on PRs. -on: - push: - branches: - - ci - - staging - -jobs: - build: - name: Python ${{ matrix.python }} - runs-on: ubuntu-latest - strategy: - matrix: - python: [3.7, 3.8, 3.9, "3.10", 3.11, pypy3.8] - - steps: - - uses: actions/checkout@v3 - - name: setup python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -e . - pip install coveralls --upgrade - - name: Run flake8 - run: | - pip install flake8 --upgrade - flake8 --exclude=build --ignore=E501,F403,F401,E241,E225,E128 . - - name: Run pycodestyle - run: | - pip install pycodestyle --upgrade - pycodestyle --ignore=E128,E261,E225,E501,W605 slugify test.py setup.py - - name: Run test - run: | - coverage run --source=slugify test.py - - name: Coveralls - run: coveralls --service=github - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml deleted file mode 100644 index 73f2f07..0000000 --- a/.github/workflows/dev.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: DEV - -# Run on push only for dev/sandbox -# Otherwise it may trigger concurrently `push & pull_request` on PRs. -on: - push: - branches: - - sandbox - - dev - -jobs: - build: - name: Python ${{ matrix.python }} - runs-on: ubuntu-latest - strategy: - matrix: - python: [3.7, 3.8, 3.9, "3.10", 3.11, pypy3.8] - - steps: - - uses: actions/checkout@v3 - - name: setup python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -e . - pip install coveralls --upgrade - - name: Run flake8 - run: | - pip install flake8 --upgrade - flake8 --exclude=build --ignore=E501,F403,F401,E241,E225,E128 . - - name: Run pycodestyle - run: | - pip install pycodestyle --upgrade - pycodestyle --ignore=E128,E261,E225,E501,W605 slugify test.py setup.py - - name: Run test - run: | - coverage run --source=slugify test.py - - name: Coveralls - run: coveralls --service=github - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index a4ae9ad..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Main - -# Run on push only for dev/sandbox -# Otherwise it may trigger concurrently `push & pull_request` on PRs. -on: - push: - branches: - - master - -jobs: - build: - name: Python ${{ matrix.python }} - runs-on: ubuntu-latest - strategy: - matrix: - python: [3.7, 3.8, 3.9, "3.10", 3.11, pypy3.8] - - steps: - - uses: actions/checkout@v3 - - name: setup python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -e . - pip install coveralls --upgrade - - name: Run flake8 - run: | - pip install flake8 --upgrade - flake8 --exclude=build --ignore=E501,F403,F401,E241,E225,E128 . - - name: Run pycodestyle - run: | - pip install pycodestyle --upgrade - pycodestyle --ignore=E128,E261,E225,E501,W605 slugify test.py setup.py - - name: Run test - run: | - coverage run --source=slugify test.py - - name: Coveralls - run: coveralls --service=github - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From c81ab72c57680539ecfcbe44e3a9191dd15bdbd6 Mon Sep 17 00:00:00 2001 From: Arpit Jain <40381412+arpitjain799@users.noreply.github.com> Date: Fri, 28 Apr 2023 00:53:59 +0900 Subject: [PATCH 3/4] Delete .github/workflows/codeql.yml --- .github/workflows/codeql.yml | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index 307c586..0000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,30 +0,0 @@ -jobs: - analyze: - name: Analyze - permissions: - actions: read - contents: read - security-events: write - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - queries: security-and-quality - - name: Autobuild - uses: github/codeql-action/autobuild@v2 - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 - strategy: - fail-fast: false - matrix: - language: - - python -name: CodeQL -'on': - push: - branches: - - master From 6aa0919886375f870b16440280e7e0bfac6f295e Mon Sep 17 00:00:00 2001 From: Arpit Jain <40381412+arpitjain799@users.noreply.github.com> Date: Fri, 28 Apr 2023 00:54:00 +0900 Subject: [PATCH 4/4] Add new file --- .github/workflows/codeql.yml | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..94d110b --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,37 @@ +name: "CodeQL" +on: + workflow_dispatch: + #push: + # branches: [master] + #pull_request: + # branches: [master] + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: ["python"] + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + queries: security-and-quality + + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 \ No newline at end of file