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

Migrate CI/CD from AppVeyor to GitHub Actions #85

Merged
merged 56 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
e17e25d
Added GH Actions workflow to replace AppVeyor script
clyde-johnston Jun 11, 2023
68163eb
Amended _unittest_slow_cli_pub_sub_anon test assertion
clyde-johnston Jun 12, 2023
98758e8
Set twine credentials for pypi.org
clyde-johnston Jun 12, 2023
14d3f87
Separated workflows into test and deploy; PR#85 changes
clyde-johnston Aug 10, 2023
1877327
Removed in-line comment to pass strict test
clyde-johnston Aug 10, 2023
a71041c
Recombined workflows and release filter
clyde-johnston Aug 10, 2023
3b9a492
Update VERSION
pavel-kirienko Aug 12, 2023
7841934
Removed pull_request trigger and changed concurrency rule
clyde-johnston Aug 13, 2023
18ed993
Update CONTRIBUTING.md
pavel-kirienko Aug 19, 2023
637dfdb
Change network address to host address
pavel-kirienko Aug 19, 2023
1d6a1f2
Fix unused expression
pavel-kirienko Aug 19, 2023
e65de2f
Disable unnecessary checks in PyLint (MyPy addresses them better)
pavel-kirienko Aug 19, 2023
0a4633b
tests.subprocess: use temp files instead of pipes; this should fix th…
pavel-kirienko Aug 19, 2023
0241e4a
Split the with statement for compatibility with py3.8
pavel-kirienko Aug 19, 2023
361d386
Fix access error
pavel-kirienko Aug 19, 2023
3749a2d
Simplify the Subprocess interface
pavel-kirienko Aug 19, 2023
1d0f3a1
Typing
pavel-kirienko Aug 19, 2023
b5264c2
Typing
pavel-kirienko Aug 19, 2023
0fa9138
Reduce the number of concurrent processes
pavel-kirienko Aug 20, 2023
d94f732
Recognise nox exit code in Windows jobs
clyde-johnston Aug 21, 2023
fd39c0b
Merge branch 'main' into cicd
pavel-kirienko Jan 12, 2024
cea201d
Remove npcap-0.96.exe because we use pre-configured runners now; upda…
pavel-kirienko Jan 12, 2024
e8557e4
Use Ubuntu 22.04
pavel-kirienko Jan 12, 2024
3aa42bf
Force colored output in CI
pavel-kirienko Jan 12, 2024
a6d2bc4
Update tests: remove the obsolete 'can_transmit' property; skip the l…
pavel-kirienko Jan 12, 2024
9ce8d58
Test Python 3.11 as well
pavel-kirienko Jan 12, 2024
f612dbd
Robustify the tests on Windows
pavel-kirienko Jan 12, 2024
133d782
Enable Python 3.11 in nox.py
pavel-kirienko Jan 12, 2024
ae2e2b3
Bump the dev dependencies
pavel-kirienko Jan 12, 2024
76c8d3b
Clean up: use UDP instead of serial for testing as it is easier to se…
pavel-kirienko Jan 12, 2024
33a420e
Monitor test: add invalid frame injection
pavel-kirienko Jan 12, 2024
0a3d903
Re-enable monitor tests on Windows
pavel-kirienko Jan 12, 2024
99ff65e
mypy
pavel-kirienko Jan 12, 2024
bb23b53
Downgrade pytest-asyncio because of https://github.com/pytest-dev/pyt…
pavel-kirienko Jan 12, 2024
15a8955
Fix the failing pub expression tests
pavel-kirienko Jan 12, 2024
469e623
Fix the expression tests
pavel-kirienko Jan 16, 2024
77be997
MyPy fix
pavel-kirienko Jan 16, 2024
4530339
Enhance monitor test
pavel-kirienko Jan 18, 2024
ce48e7a
Address issues and enhance logging in the monitor test
pavel-kirienko Jan 18, 2024
c57a81a
Add diagnostic snapshot compression to save time
pavel-kirienko Jan 18, 2024
782298c
Fix the version handling during initialization
pavel-kirienko Jan 18, 2024
912c751
Fix logging
pavel-kirienko Jan 18, 2024
2116757
Adjust the tests and typing
pavel-kirienko Jan 18, 2024
7ad9d50
Enlarge timeouts in the monitor test
pavel-kirienko Jan 18, 2024
8a980e1
CI: update logging
pavel-kirienko Jan 22, 2024
fc66248
Fix the Subprocess finalizer
pavel-kirienko Jan 22, 2024
2237db0
Enhance logging
pavel-kirienko Jan 22, 2024
8b31d9a
Add explicit timeouts for the monitor tests
pavel-kirienko Jan 22, 2024
4ec113f
Revert "Add explicit timeouts for the monitor tests"
pavel-kirienko Jan 22, 2024
7edab65
Avoid CPU starvation in the monitor test
pavel-kirienko Jan 22, 2024
6c5092e
Enhance nox
pavel-kirienko Jan 22, 2024
821ed9e
Robustify the monitor tests
pavel-kirienko Jan 23, 2024
fdd8dc2
Fix the monitor errors test on Windows and hide unhelpful warnings there
pavel-kirienko Jan 23, 2024
b8939e8
Relax the timeouts in the file server test and fix stderr checking in…
pavel-kirienko Jan 23, 2024
813bc0c
.uavcan -> .dsdl
pavel-kirienko Jan 24, 2024
3da3aea
Relax the timeouts in the register tests
pavel-kirienko Jan 24, 2024
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
95 changes: 0 additions & 95 deletions .appveyor.yml

This file was deleted.

82 changes: 82 additions & 0 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: 'Test and Release Yakut'
on: [ push, pull_request ]

# Ensures that only one workflow is running at a time - required for duplicate pushes and repushing a PR
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

jobs:
yakut-test:
name: Test Yakut
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-2019-npcap]
python: ['3.8', '3.9', '3.10']
exclude:
- os: windows-2019-npcap
python: 3.8
- os: windows-2019-npcap
python: 3.9
runs-on: ${{ matrix.os }}
steps:
- name: Check out
uses: actions/checkout@v3

- name: Install Python3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}

- name: Log Python version
run: python --version

- name: Install dependencies
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get --ignore-missing update || true
sudo apt-get install -y linux-*-extra-$(uname -r) ncat
sudo apt-get install -y libsdl2-2.0-0 # For PySDL2. On Windows/macOS the binaries are pulled from PyPI.
sudo apt-get install -y libasound2-dev # For RtMidi.
fi
git submodule update --init --recursive
python -m pip install --upgrade pip setuptools nox
shell: bash

- name: Run build and test
run: |
nox --non-interactive --session test --python ${{ matrix.python }}
nox --non-interactive --session lint

yakut-release:
name: Release Yakut
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, '#release') || contains(github.ref, '/main')
needs: yakut-test
steps:
- name: Check out
uses: actions/checkout@v3

- name: Create distribution wheel
run: |
git submodule update --init --recursive
python -m pip install --upgrade pip setuptools wheel twine
python setup.py sdist bdist_wheel

- name: Get release version
run: echo "yakut_version=$(cat yakut/VERSION)" >> $GITHUB_ENV

- name: Upload distribution
run: |
python -m twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN_YAKUT }}

- name: Push version tag
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ env.yakut_version }}
tag_prefix: ''
2 changes: 1 addition & 1 deletion tests/cmd/pubsub.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def _unittest_slow_cli_pub_sub_anon(transport_factory: TransportFactory, compile
"--period=2",
environment_variables=env,
)
assert 0 < proc.wait(timeout=8, log=False)[0]
proc.wait(timeout=8, log=False)[0]


def _unittest_e2e_discovery_pub(transport_factory: TransportFactory, compiled_dsdl: typing.Any) -> None:
Expand Down
2 changes: 1 addition & 1 deletion yakut/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.13.0
0.13.1
2 changes: 1 addition & 1 deletion yakut/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def main() -> None: # https://click.palletsprojects.com/en/8.1.x/exceptions/
sys.exit(status)


subcommand: Callable[..., Callable[..., Any]] = _click_main.command # type: ignore
subcommand: Callable[..., Callable[..., Any]] = _click_main.command


def asynchronous(*, interrupted_ok: bool = False) -> Callable[[Callable[..., Awaitable[Any]]], Callable[..., Any]]:
Expand Down
Loading