mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-11 09:05:07 +00:00
github/workflows: Modernize toolchain.
This commit is contained in:
@@ -20,16 +20,14 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install poetry
|
||||
poetry run python -m pip install --upgrade pip
|
||||
poetry run python -m pip install --upgrade setuptools
|
||||
pipx install poetry
|
||||
poetry install
|
||||
- name: Lint Python code
|
||||
run: poetry run ruff check
|
||||
|
||||
@@ -5,7 +5,7 @@ on: [push, pull_request]
|
||||
jobs:
|
||||
test:
|
||||
if: github.ref_type != 'tag'
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- run: pipx install poetry
|
||||
|
||||
@@ -11,7 +11,7 @@ permissions:
|
||||
|
||||
jobs:
|
||||
publish_ide_docs:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Get version from tag
|
||||
run: |
|
||||
@@ -23,17 +23,11 @@ jobs:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Set up Python 3.8
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.8
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install poetry
|
||||
poetry run python -m pip install --upgrade pip
|
||||
poetry run python -m pip install --upgrade setuptools
|
||||
pipx install poetry
|
||||
poetry install --only=doc
|
||||
- uses: actions/setup-node@v4
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: '24'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
@@ -11,7 +11,7 @@ permissions:
|
||||
|
||||
jobs:
|
||||
publish_jedi:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: Get version from tag
|
||||
@@ -21,10 +21,6 @@ jobs:
|
||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||
echo "NPM_VERSION=$NPM_VERSION" >> $GITHUB_ENV
|
||||
echo "NPM_TAG=$(echo "$NPM_VERSION" | grep -q '-' && echo 'next' || echo 'latest')" >> $GITHUB_ENV
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Install poetry
|
||||
run: pipx install poetry
|
||||
- name: Set pybricks-jedi version
|
||||
@@ -34,7 +30,7 @@ jobs:
|
||||
run: |
|
||||
poetry version "$VERSION"
|
||||
sed -i "s/^pybricks = \".*\"/pybricks = \"$VERSION\"/" jedi/pyproject.toml
|
||||
- uses: actions/setup-node@v4
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: '24'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
@@ -11,7 +11,7 @@ permissions:
|
||||
jobs:
|
||||
create_release:
|
||||
name: Create release on GitHub
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
@@ -36,7 +36,7 @@ jobs:
|
||||
-F CHANGELOG.md \
|
||||
$PRERELEASE_FLAG
|
||||
build_and_publish:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- run: pipx run poetry build
|
||||
|
||||
+2
-2
@@ -6,9 +6,9 @@
|
||||
version: 2
|
||||
|
||||
build:
|
||||
os: "ubuntu-22.04"
|
||||
os: "ubuntu-24.04"
|
||||
tools:
|
||||
python: "3.10"
|
||||
python: "3.12"
|
||||
jobs:
|
||||
post_create_environment:
|
||||
- pip install poetry
|
||||
|
||||
Reference in New Issue
Block a user