diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml deleted file mode 100644 index ebe68e58..00000000 --- a/.github/workflows/build.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: Build for test -on: - - workflow_call - -jobs: - build: - runs-on: ubuntu-22.04 - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.10' - cache: 'pip' - cache-dependency-path: pyproject.toml - - - name: Install dependencies - run: | - pip install --upgrade pip - pip install .[dev,github-actions] diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 00000000..3bee90a9 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,28 @@ +name: CI +on: + - push + - pull_request + +jobs: + ci: + name: CI + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: ['ubuntu-22.04'] + python-version: ['3.10'] + test_target: ['apps', 'hpo'] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' + cache-dependency-path: pyproject.toml + - name: Install dependencies + run: | + pip install --upgrade pip + pip install .[dev,github-actions] + - name: Run pytest + run: pytest -v --cov=aiaccel --cov-branch --cov-report=term-missing tests/${{ strategy.target }} + diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 00000000..9558b9f7 --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,31 @@ +name: Lint +on: + - push + - pull_request + +jobs: + lint: + name: Lint + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: ['ubuntu-22.04'] + python-version: ['3.10'] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' + cache-dependency-path: pyproject.toml + - name: Install dependencies + run: | + pip install --upgrade pip + pip install .[dev,github-actions] + - name: Perform ruff + run: | + ruff check + ruff format --check + - name: Perform mypy + run: | + mypy --config-file mypy.ini . diff --git a/.github/workflows/mypy.yaml b/.github/workflows/mypy.yaml deleted file mode 100644 index ece7e1da..00000000 --- a/.github/workflows/mypy.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: Perform type checking -on: [push, pull_request] - -jobs: - build: - uses: ./.github/workflows/build.yaml - - mypy: - steps: - - name: Perform mypy - run: | - mypy --config-file mypy.ini . diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml deleted file mode 100644 index f93b58d0..00000000 --- a/.github/workflows/pytest.yaml +++ /dev/null @@ -1,15 +0,0 @@ -name: Test aiaccel/apps/ -on: [push, pull_request] - -jobs: - build: - uses: ./.github/workflows/build.yaml - pytest: - strategy: - matrix: - target: - - apps - - hpo - steps: - - name: Run pytest - run: pytest -v --cov=aiaccel --cov-branch --cov-report=term-missing tests/${{ strategy.target }} diff --git a/.github/workflows/ruff.yaml b/.github/workflows/ruff.yaml deleted file mode 100644 index aab5877d..00000000 --- a/.github/workflows/ruff.yaml +++ /dev/null @@ -1,13 +0,0 @@ -name: Check code formating -on: [push, pull_request] - -jobs: - build: - uses: ./.github/workflows/build.yaml - - ruff: - steps: - - name: Perform ruff - run: | - ruff check - ruff format --check