diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index ad8136b..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,22 +0,0 @@ -version: 2.1 - -orbs: - python: circleci/python@1.3.2 - -jobs: - build-and-test: - executor: - name: python/default - tag: "3.8" - steps: - - checkout - - python/install-packages: - pkg-manager: pip - - run: - command: python check_advisories.py --all - name: Test - -workflows: - main: - jobs: - - build-and-test diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0d9aba1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,24 @@ +name: Check Advisories + +on: + # Triggers the workflow on push events only for the default branch + pull_request: + push: + branches: + - master + +jobs: + fetch: + name: Check Advisories + runs-on: ubuntu-latest + steps: + - name: Clone repository + uses: actions/checkout@v3 + - name: Set up Python 3 + uses: actions/setup-python@v3 + with: + python-version: '3.9' + - name: Install Python dependencies + run: pip install ./ + - name: Run Advisories Checks + run: check_advisories --all diff --git a/pre-commit-hook.sh b/pre-commit-hook.sh index 7f85077..e7aa4a8 100755 --- a/pre-commit-hook.sh +++ b/pre-commit-hook.sh @@ -1,6 +1,6 @@ #!/bin/sh -python check_advisories.py --staged +check_advisories --staged-only if [ "$?" -ne "0" ]; then echo "Aborting commit. Fix above errors or do 'git commit --no-verify'."