From ef56f0fec28ac4daa6bd644f6773559da814b870 Mon Sep 17 00:00:00 2001 From: Arpit Jain Date: Wed, 26 Apr 2023 03:03:03 +0900 Subject: [PATCH 1/6] 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 00000000..d37b243a --- /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: + - main From 5cdc651c22326e09a70505f3a931d38033bf2b3b Mon Sep 17 00:00:00 2001 From: Arpit Jain Date: Wed, 26 Apr 2023 15:57:51 +0900 Subject: [PATCH 2/6] Added CodeQL code --- .github/workflows/black.yaml | 25 ------------------ .github/workflows/test.yml | 43 ------------------------------- .github/workflows/wheel.yml | 50 ------------------------------------ 3 files changed, 118 deletions(-) delete mode 100644 .github/workflows/black.yaml delete mode 100644 .github/workflows/test.yml delete mode 100644 .github/workflows/wheel.yml diff --git a/.github/workflows/black.yaml b/.github/workflows/black.yaml deleted file mode 100644 index 1e28b7b5..00000000 --- a/.github/workflows/black.yaml +++ /dev/null @@ -1,25 +0,0 @@ -name: Black - -on: ["push", "pull_request"] - -jobs: - black: - # We want to run on external PRs, but not on our own internal PRs as they'll be run - # by the push to the branch. - if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository - - runs-on: ubuntu-latest - steps: - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: '3.x' - architecture: 'x64' - - - name: Checkout - uses: actions/checkout@v3 - - - name: Black Code Formatter - run: | - pip install black==22.3.0 - black -S --diff --check msgpack/ test/ setup.py diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 88781025..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Run tests -on: - push: - branches: [main] - pull_request: - create: - -jobs: - test: - strategy: - matrix: - os: ["ubuntu-latest", "windows-latest", "macos-latest"] - py: ["3.11", "3.10", "3.9", "3.8", "3.7"] - - runs-on: ${{ matrix.os }} - name: Run test with Python ${{ matrix.py }} on ${{ matrix.os }} - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.py }} - cache: "pip" - - - name: Build - shell: bash - run: | - pip install -r requirements.txt pytest - make cython - pip install . - - - name: Test (C extension) - shell: bash - run: | - pytest -v test - - - name: Test (pure Python fallback) - shell: bash - run: | - MSGPACK_PUREPYTHON=1 pytest -v test diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml deleted file mode 100644 index 6cf2fe94..00000000 --- a/.github/workflows/wheel.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Build Wheels -on: - push: - branches: [main] - create: - -jobs: - build_wheels: - strategy: - matrix: - os: ["ubuntu-latest", "windows-latest", "macos-latest"] - runs-on: ${{ matrix.os }} - name: Build wheels on ${{ matrix.os }} - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up QEMU - if: runner.os == 'Linux' - uses: docker/setup-qemu-action@v1 - with: - platforms: arm64 - - - name: Set up Python 3.x - uses: actions/setup-python@v4 - with: - python-version: "3.x" - cache: "pip" - - - name: Prepare - shell: bash - run: | - pip install -r requirements.txt - make cython - - - name: Build - uses: pypa/cibuildwheel@v2.12.0 - env: - CIBW_TEST_REQUIRES: "pytest" - CIBW_TEST_COMMAND: "pytest {package}/test" - CIBW_ARCHS_LINUX: auto aarch64 - CIBW_ARCHS_MACOS: x86_64 universal2 arm64 - CIBW_SKIP: pp* - - - name: Upload Wheels to artifact - uses: actions/upload-artifact@v1 - with: - name: Wheels - path: wheelhouse From 31d4c7c0d8325efbb6c15036f0fc8937d78ad3d8 Mon Sep 17 00:00:00 2001 From: Arpit Jain <40381412+arpitjain799@users.noreply.github.com> Date: Fri, 28 Apr 2023 00:25:04 +0900 Subject: [PATCH 3/6] 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 d37b243a..00000000 --- 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: - - main From bf81d73fe421204342c160ec2a0757221ba16c5d Mon Sep 17 00:00:00 2001 From: Arpit Jain <40381412+arpitjain799@users.noreply.github.com> Date: Fri, 28 Apr 2023 00:25:05 +0900 Subject: [PATCH 4/6] 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 00000000..94d110b3 --- /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 From 7330b0ec20a203ae458574fc12bb7b6cb4459c15 Mon Sep 17 00:00:00 2001 From: Arpit Jain <40381412+arpitjain799@users.noreply.github.com> Date: Fri, 28 Apr 2023 04:25:12 +0900 Subject: [PATCH 5/6] Delete .github/workflows/codeql.yml --- .github/workflows/codeql.yml | 37 ------------------------------------ 1 file changed, 37 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 94d110b3..00000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,37 +0,0 @@ -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 From f549ade798b4b54735873723f526bcc9e62eacd9 Mon Sep 17 00:00:00 2001 From: Arpit Jain <40381412+arpitjain799@users.noreply.github.com> Date: Fri, 28 Apr 2023 04:25:13 +0900 Subject: [PATCH 6/6] 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 00000000..94d110b3 --- /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