From cb9d6ec7be6eb906730873f9867c126395722e5b Mon Sep 17 00:00:00 2001 From: Arpit Jain Date: Wed, 26 Apr 2023 18:13:32 +0900 Subject: [PATCH 1/3] Added CodeQL code --- .github/workflows/codeql.yml | 30 +++++++++++++++++++++++ .github/workflows/main.yml | 47 ------------------------------------ 2 files changed, 30 insertions(+), 47 deletions(-) create mode 100644 .github/workflows/codeql.yml delete mode 100644 .github/workflows/main.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 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index fc0c27b..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: Tests - -on: - push: - branches: - - master - pull_request: - branches: - - master - -defaults: - run: - shell: bash -l {0} - -jobs: - run: - runs-on: ${{ matrix.os }} - - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - python-version: [3.9] - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup conda - uses: conda-incubator/setup-miniconda@v2 - with: - python-version: ${{ matrix.python-version }} - mamba-version: "*" - auto-activate-base: false - channels: conda-forge - - - name: Install dependencies - run: mamba install ipython matplotlib flake8 - - - name: Install package - run: pip install . - - - name: Test installation - run: python -c 'from matplotlib_inline.backend_inline import show' - - - name: Test flake8 - run: flake8 matplotlib_inline --ignore=E501,W504,W503 From 1c9152e5097902b86a26b352282b9170f0bc89c1 Mon Sep 17 00:00:00 2001 From: Arpit Jain <40381412+arpitjain799@users.noreply.github.com> Date: Fri, 28 Apr 2023 04:18:05 +0900 Subject: [PATCH 2/3] 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 138b74e1eb481d5df59963d2f7fdc03632e819e0 Mon Sep 17 00:00:00 2001 From: Arpit Jain <40381412+arpitjain799@users.noreply.github.com> Date: Fri, 28 Apr 2023 04:18:06 +0900 Subject: [PATCH 3/3] 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