diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c158df2..a9c5e17 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,28 +7,33 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: python-version: '3.10' - - name: Install tox - run: python -m pip install tox + cache: 'pip' + cache-dependency-path: 'requirements/*.txt' + - name: Install dev dependencies + run: python -m pip install -r requirements/dev.txt - name: Run linting run: python -m tox -e lint test: - runs-on: ubuntu-latest strategy: matrix: python: ['3.6', '3.7', '3.8', '3.9', '3.10'] + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} - - name: Install tox - run: python -m pip install tox + cache: 'pip' + cache-dependency-path: 'requirements/*.txt' + - name: Install dev dependencies + run: python -m pip install -r requirements/dev.txt - name: Run tests run: python -m tox -e py # Run tox using the version of Python in `PATH` diff --git a/.github/workflows/pypi-release.yml b/.github/workflows/pypi-release.yml index 1a9fbc8..50826f1 100644 --- a/.github/workflows/pypi-release.yml +++ b/.github/workflows/pypi-release.yml @@ -9,17 +9,18 @@ jobs: build-and-publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: - python-version: "3.x" + python-version: "3.10" + cache: 'pip' - name: Install build dependencies run: pip install -U setuptools wheel build - name: Build run: python -m build . - name: Publish - uses: pypa/gh-action-pypi-publish@master + uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.pypi_password }} - name: Install GitPython and cloudevents for pypi_packaging diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bed84b..837a1cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Code quality and styling tooling is unified and configs compatibility is ensured ([#167]) +- CI configurations updated and added macOS and Windows tests ([#169]) ### Removed - `docs` folder and related unused tooling ([#168]) @@ -151,3 +152,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [#165]: https://github.com/cloudevents/sdk-python/pull/165 [#167]: https://github.com/cloudevents/sdk-python/pull/167 [#168]: https://github.com/cloudevents/sdk-python/pull/168 +[#169]: https://github.com/cloudevents/sdk-python/pull/169