diff --git a/.github/workflows/dissect-ci.yml b/.github/workflows/dissect-ci.yml new file mode 100644 index 0000000..9ef77e8 --- /dev/null +++ b/.github/workflows/dissect-ci.yml @@ -0,0 +1,35 @@ +name: Dissect CI +on: + push: + branches: + - main + tags: + - '*' + pull_request: + workflow_dispatch: + +jobs: + ci: + uses: fox-it/dissect-workflow-templates/.github/workflows/dissect-ci-template.yml@main + secrets: inherit + + publish: + if: ${{ github.ref_name == 'main' || github.ref_type == 'tag' }} + needs: [ci] + runs-on: ubuntu-latest + environment: dissect_publish + permissions: + id-token: write + steps: + - uses: actions/download-artifact@v4 + with: + name: packages + path: dist/ + # According to the documentation, it automatically looks inside the `dist/` folder for packages. + - name: Publish package distributions to Pypi + uses: pypa/gh-action-pypi-publish@release/v1 + + trigger-tests: + needs: [publish] + uses: fox-it/dissect-workflow-templates/.github/workflows/dissect-ci-demand-test-template.yml@main + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml deleted file mode 100644 index 44cc160..0000000 --- a/.github/workflows/package.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Package - -on: - push: - branches: [main] - pull_request: - branches: [main] - release: - types: [published] - -jobs: - deploy: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.9' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install tox - - name: Build package via tox - run: tox -e build - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: dist-files - path: dist/* diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index 141ec9e..0000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,70 +0,0 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: Tests - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Python 3.x - uses: actions/setup-python@v5 - with: - python-version: "3.x" - - name: Install dependencies - run: | - python -m pip install tox - - name: Lint via tox - run: | - tox -e lint - test-py3: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install tox - - name: Test via tox - run: | - tox -e py3 - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 - with: - token: ${{ secrets.DISSECT_CODECOV_TOKEN }} - env_vars: PYTHON - files: coverage.xml - flags: unittests - verbose: true - test-pypy3: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - python-version: ["pypy-3.9", "pypy-3.10"] - steps: - - uses: actions/checkout@v4 - - name: Set up Pypy ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install tox - - name: Test via tox - run: | - tox -e pypy3