Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various chores #169

Merged
merged 4 commits into from
Dec 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 8 additions & 28 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [ pull_request ]

jobs:
pre-commit:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: snok/install-poetry@v1
Expand All @@ -14,60 +14,40 @@ jobs:
installer-parallel: true
- uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: "3.10"
cache: 'poetry'
- name: Install dependencies
run: poetry install --no-interaction --no-root
- run: source .venv/bin/activate
- uses: pre-commit/[email protected]

fast-tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Unit tests
run: bazel test //src/... //test/aspect:all
run: bazel test -- //src/... //test/aspect:all //third_party/...
- name: Execute Mypy
run: bazel build --config=mypy //src/... //test/aspect:all
run: bazel build --config=mypy -- //src/... //test/aspect:all

integration-tests-aspect:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: [ pre-commit, fast-tests ]
steps:
- uses: actions/checkout@v4
- name: Integration tests - Aspect
run: ./test/aspect/execute_tests.py

integration-tests-apply-fixes:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: [ pre-commit, fast-tests ]
steps:
- run: |
mkdir --parents /tmp/bin
wget --no-verbose https://github.com/bazelbuild/buildtools/releases/download/v6.1.2/buildozer-linux-amd64 -O /tmp/bin/buildozer
wget --no-verbose https://github.com/bazelbuild/buildtools/releases/download/v6.4.0/buildozer-linux-amd64 -O /tmp/bin/buildozer
chmod +x /tmp/bin/buildozer
- uses: actions/checkout@v4
- name: Integration tests - Applying fixes
run: |
export PATH=/tmp/bin:$PATH
./test/apply_fixes/execute_tests.py

# tests:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v4
# - uses: snok/install-poetry@v1
# with:
# virtualenvs-create: true
# virtualenvs-in-project: true
# installer-parallel: true
# - uses: actions/setup-python@v5
# with:
# python-version: 3.8
# cache: 'poetry'
# - name: Install dependencies
# run: poetry install --no-interaction --no-root
# - name: Display Python version
# run: python -c "import sys; print(sys.version)"
# - name: Coverage
# run: poetry run pytest --cov --pylint
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,10 @@ Even if analysing the code works initially, it might break at any time if the or

| Platform | Constraints |
| ---------------- | ---------------------------------------------------------------------------------------------------------- |
| Operating system | No constraints by design. However, Ubuntu 20.04 is currently the only OS used for development and testing. |
| Python | Minimum version is 3.8. Multiple versions are tested. |
| Bazel | Minimum version is 5.4.0. Multiple versions are tested. |
| Buildozer | No known limitations. Tests have been performed with 5.0.1. |
| Operating system | No constraints by design. However, Ubuntu 22.04 is currently the only OS used for development and testing. |
| Python | Minimum version is 3.8. All newer major versions until 3.12 are tested. |
| Bazel | Minimum version is 5.4.0. Multiple newer versions are tested including rolling releases. |
| Buildozer | No known limitations. Tests are performed with 6.4.0. |

# Alternatives to DWYU

Expand Down
6 changes: 3 additions & 3 deletions tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ set -o nounset
echo ""
echo "Execute unit tests"
echo ""
bazel test //src/... //test/aspect:all
bazel test -- //src/... //test/aspect:all //third_party/...

echo ""
echo "Executing mypy"
echo
bazel build --config=mypy //src/... //test/aspect:all
echo ""
bazel build --config=mypy -- //src/... //test/aspect:all

echo ""
echo "Execute integration tests - Aspect"
Expand Down
7 changes: 0 additions & 7 deletions third_party/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ alias(
visibility = ["//:__pkg__"],
)

compile_pip_requirements(
name = "requirements",
extra_args = ["--resolver=backtracking"],
requirements_in = "requirements.in",
requirements_txt = "requirements.txt",
)

compile_pip_requirements(
name = "mypy_requirements",
extra_args = ["--resolver=backtracking"],
Expand Down
1 change: 0 additions & 1 deletion third_party/requirements.in

This file was deleted.

10 changes: 0 additions & 10 deletions third_party/requirements.txt

This file was deleted.