Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
martis42 committed Jan 14, 2024
1 parent 7bcf20b commit ce75ca8
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 69 deletions.
134 changes: 67 additions & 67 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,48 @@ name: CI
on: [ pull_request ]

jobs:
pre-commit:
runs-on: ubuntu-22.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.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-22.04
needs: [ pre-commit ]
steps:
- uses: actions/checkout@v4
- name: Unit tests
run: ./scripts/unit_tests.sh
- name: Execute Mypy
run: ./scripts/mypy.sh
- name: Build aspect integration tests
run: |
cd test/aspect
bazel build //...
- name: Build examples
run: |
cd examples
bazel build //...
# pre-commit:
# runs-on: ubuntu-22.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.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-22.04
# needs: [ pre-commit ]
# steps:
# - uses: actions/checkout@v4
# - name: Unit tests
# run: ./scripts/unit_tests.sh
# - name: Execute Mypy
# run: ./scripts/mypy.sh
# - name: Build aspect integration tests
# run: |
# cd test/aspect
# bazel build //...
# - name: Build examples
# run: |
# cd examples
# bazel build //...

integration-tests-aspect:
strategy:
matrix:
os: [ ubuntu-22.04, macos-12 ]
os: [ ubuntu-22.04, windows-2022 ]
runs-on: ${{ matrix.os }}
needs: [ fast-tests ]
#needs: [ fast-tests ]
steps:
- uses: actions/checkout@v4
- name: Integration tests - Aspect
Expand All @@ -53,33 +53,33 @@ jobs:
cd aspect
python execute_tests.py
integration-tests-apply-fixes:
runs-on: ubuntu-22.04
needs: [ fast-tests ]
steps:
- run: |
mkdir --parents /tmp/bin
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
integration-tests-examples:
strategy:
matrix:
os: [ ubuntu-22.04, macos-12, windows-2022 ]
runs-on: ${{ matrix.os }}
needs: [ fast-tests ]
steps:
- uses: actions/checkout@v4
- name: Integration tests - Examples
run: |
cd examples
python test.py
- name: Integration tests - Examples with legacy WORKSPACE setup
run: |
cd examples
python test.py --legacy-workspace
# integration-tests-apply-fixes:
# runs-on: ubuntu-22.04
# needs: [ fast-tests ]
# steps:
# - run: |
# mkdir --parents /tmp/bin
# 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
#
# integration-tests-examples:
# strategy:
# matrix:
# os: [ ubuntu-22.04, macos-12, windows-2022 ]
# runs-on: ${{ matrix.os }}
# needs: [ fast-tests ]
# steps:
# - uses: actions/checkout@v4
# - name: Integration tests - Examples
# run: |
# cd examples
# python test.py
# - name: Integration tests - Examples with legacy WORKSPACE setup
# run: |
# cd examples
# python test.py --legacy-workspace
3 changes: 1 addition & 2 deletions test/aspect/execution_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import logging
import subprocess
from importlib.machinery import SourceFileLoader
from os import environ
from pathlib import Path
from typing import TYPE_CHECKING

Expand Down Expand Up @@ -75,7 +74,7 @@ def main(
versions = [TestedVersions(bazel=bazel, python=python)] if bazel and python else tested_versions

failed_tests = []
output_root = Path(environ["HOME"]) / ".cache" / "bazel" / workspace_path.relative_to("/")
output_root = Path.home() / ".cache" / "bazel" / "dwyu"
for version in versions:
output_base = output_root / f"aspect_integration_tests_bazel_{version.bazel}_python_{version.python}"
output_base.mkdir(parents=True, exist_ok=True)
Expand Down

0 comments on commit ce75ca8

Please sign in to comment.