diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml deleted file mode 100644 index c028ce82d..000000000 --- a/.github/workflows/changelog.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: changelog - -on: - # We need pull_request_target instead of pull_request because a write - # repository token is needed to add a review to a PR. DO NOT BUILD - # OR RUN UNTRUSTED CODE FROM PRs IN THIS ACTION - pull_request_target: - types: [opened, edited, synchronize] - -jobs: - check_changelog: - # no need to check for dependency updates via dependabot - if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' - runs-on: ubuntu-20.04 - env: - NO_CHANGELOG: '[x] No CHANGELOG update needed' - steps: - - name: Get changed files - id: files - uses: Ana06/get-changed-files@v1.2 - - name: check changelog updated - id: changelog_updated - env: - PR_BODY: ${{ github.event.pull_request.body }} - FILES: ${{ steps.files.outputs.modified }} - run: | - echo $FILES | grep -qF 'CHANGELOG.md' || echo $PR_BODY | grep -qiF "$NO_CHANGELOG" - - name: Reject pull request if no CHANGELOG update - if: ${{ always() && steps.changelog_updated.outcome == 'failure' }} - uses: Ana06/automatic-pull-request-review@v0.1.0 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - event: REQUEST_CHANGES - body: "Please add bug fixes, new features, breaking changes and anything else you think is worthwhile mentioning to the `master (unreleased)` section of CHANGELOG.md. If no CHANGELOG update is needed add the following to the PR description: `${{ env.NO_CHANGELOG }}`" - allow_duplicate: false - - name: Dismiss previous review if CHANGELOG update - uses: Ana06/automatic-pull-request-review@v0.1.0 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - event: DISMISS - body: "CHANGELOG updated or no update needed, thanks! :smile:" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ac7494266..d8b8806a4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,4 +1,4 @@ -name: CI +name: CI ${{ github.event.pull_request.number }} on: push: @@ -11,7 +11,7 @@ env: CAPA_SAVE_WORKSPACE: "True" jobs: - changelog_format: + lint: runs-on: ubuntu-20.04 steps: - name: Checkout capa @@ -22,69 +22,22 @@ jobs: number=$(grep '\- *$' CHANGELOG.md | wc -l) if [ $number != 1 ]; then exit 1; fi - code_style: - runs-on: ubuntu-20.04 - steps: - - name: Checkout capa - uses: actions/checkout@v2 - - name: Set up Python 3.8 - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - name: Install dependencies - run: pip install -e .[dev] - - name: Lint with isort - run: isort --profile black --length-sort --line-width 120 -c . - - name: Lint with black - run: black -l 120 --check . - - name: Check types with mypy - run: mypy --config-file .github/mypy/mypy.ini capa/ scripts/ tests/ - - rule_linter: - runs-on: ubuntu-20.04 - steps: - - name: Checkout capa with submodules - uses: actions/checkout@v2 - with: - submodules: true - - name: Set up Python 3.8 - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - name: Install capa - run: pip install -e . - - name: Run rule linter - run: python scripts/lint.py rules/ - tests: name: Tests in ${{ matrix.python-version }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} - needs: [code_style, rule_linter] strategy: fail-fast: false matrix: os: [ubuntu-20.04, windows-2019, macos-10.15] - # across all operating systems - python-version: [3.6, 3.9] - include: - # on Ubuntu run these as well - - os: ubuntu-20.04 - python-version: 3.7 - - os: ubuntu-20.04 - python-version: 3.8 + python-version: ["3.8", "3.10"] steps: - - name: Checkout capa with submodules + - name: Checkout code uses: actions/checkout@v2 - with: - submodules: true - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - - name: Install pyyaml - if: matrix.os == 'ubuntu-20.04' - run: sudo apt-get install -y libyaml-dev - - name: Install capa + - name: Install dependencies run: pip install -e .[dev] - name: Run tests run: pytest -v tests/ diff --git a/ana.txt b/ana.txt new file mode 100644 index 000000000..bc17c93b4 --- /dev/null +++ b/ana.txt @@ -0,0 +1 @@ +hola! diff --git a/rules b/rules index d187d41cd..18ea20dae 160000 --- a/rules +++ b/rules @@ -1 +1 @@ -Subproject commit d187d41cdbf10894bef80be35504f6cfe902205a +Subproject commit 18ea20dae1f8fb0c5f2aec069c3091cd4425080b diff --git a/setup.py b/setup.py index e09ace4d7..37f023c86 100644 --- a/setup.py +++ b/setup.py @@ -73,7 +73,7 @@ "pytest-cov==3.0.0", "pycodestyle==2.8.0", "black==21.10b0", - "isort==5.10.0", + "isort==5.12.0", "mypy==0.910", "psutil==5.8.0", # type stubs for mypy diff --git a/tests/data b/tests/data index c34c9f1c0..970a89264 160000 --- a/tests/data +++ b/tests/data @@ -1 +1 @@ -Subproject commit c34c9f1c038b6b131eeb243eb153d7309f92aaac +Subproject commit 970a89264dfe6cee0e14c8ff127c64f6b457c002