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