Skip to content

Commit

Permalink
Bump versions of GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
axelboc committed Nov 25, 2024
1 parent 6420202 commit cbe677f
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 43 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

name: Python build and test

"on":
Expand Down Expand Up @@ -35,16 +34,16 @@ jobs:
- 6379:6379

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

# Pin micromamba version because of following issue:
# https://github.com/mamba-org/setup-micromamba/issues/225
- name: Set up Conda environment
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
create-args: >-
python=${{ matrix.python-version }}
Expand Down
29 changes: 14 additions & 15 deletions .github/workflows/bump_version_and_tag.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

# yamllint disable rule:line-length

name: Create/Update Tag
Expand All @@ -13,25 +12,25 @@ jobs:
create-version-tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
token: ${{ secrets.CI_TOKEN }}
- name: Set up Python 3.10
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Update version
id: update-version
run: |
pip install --upgrade pip
pip install poetry
poetry version minor
git config --global user.email "[email protected]"
git config --global user.name "Marcus Oskarsson"
git add -A
git commit -m "[skip ci] Bumped minor version"
git push -f
poetry build
pip install --upgrade pip
pip install poetry
poetry version minor
git config --global user.email "[email protected]"
git config --global user.name "Marcus Oskarsson"
git add -A
git commit -m "[skip ci] Bumped minor version"
git push -f
poetry build
- name: Publish package to PyPI
id: publish-pacakge
run: |
Expand All @@ -45,7 +44,7 @@ jobs:
echo ::set-output name=tag_name::v$(python -c 'import toml; print(toml.load("./pyproject.toml")["tool"]["poetry"]["version"])')
- name: Check tag exists
id: check-tag-exists
uses: actions/github-script@v6
uses: actions/github-script@v7
env:
TAG: ${{ steps.set-tag.outputs.tag_name }}
with:
Expand All @@ -70,7 +69,7 @@ jobs:
core.setOutput('exists', exists);
- name: Update tag
uses: actions/github-script@v6
uses: actions/github-script@v7
if: steps.check-tag-exists.outputs.exists == 'true'
env:
TAG: ${{ steps.set-tag.outputs.tag_name }}
Expand All @@ -85,7 +84,7 @@ jobs:
})
- name: Create tag
uses: actions/github-script@v6
uses: actions/github-script@v7
if: steps.check-tag-exists.outputs.exists != 'true'
env:
TAG: ${{ steps.set-tag.outputs.tag_name }}
Expand Down
17 changes: 4 additions & 13 deletions .github/workflows/pages.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---


name: "Pages"

concurrency:
Expand All @@ -11,13 +9,10 @@ concurrency:
push: null

jobs:

"pages-build":

runs-on: "ubuntu-22.04"

services:

# The Redis server is necessary to run the app,
# which is necessary to get the Flask routes with `autoflask` directives
redis:
Expand All @@ -31,7 +26,6 @@ jobs:
- "6379:6379/tcp"

steps:

- name: "Checkout"
uses: "actions/checkout@v4" # tested with v4.0.0
with:
Expand All @@ -43,7 +37,7 @@ jobs:
# Pin micromamba version because of following issue:
# https://github.com/mamba-org/setup-micromamba/issues/225
- name: "Setup conda environment with micromamba"
uses: "mamba-org/setup-micromamba@v1" # tested with v1.4.4
uses: "mamba-org/setup-micromamba@v2" # tested with v2.0.1
with:
environment-file: "conda-environment.yml"
micromamba-version: 1.5.10-0
Expand All @@ -58,12 +52,11 @@ jobs:
# This could potentially be run only when we intent to deploy...
# ...but it can be useful to have the artifact for debugging
# if: "github.ref_name == github.event.repository.default_branch"
uses: "actions/upload-pages-artifact@v2" # tested with v2.0.0
uses: "actions/upload-pages-artifact@v3" # tested with v3.0.1
with:
path: "docs/build/html"

"pages-deploy":

if: "github.ref_name == github.event.repository.default_branch"

environment:
Expand All @@ -80,13 +73,11 @@ jobs:
runs-on: "ubuntu-22.04"

steps:

- name: "Setup GitHub Pages"
uses: "actions/configure-pages@v3" # tested with v3.0.6
uses: "actions/configure-pages@v5" # tested with v5.0.0

- name: "Deploy to GitHub Pages"
id: "deployment"
uses: "actions/deploy-pages@v2" # tested with 2.0.4

uses: "actions/deploy-pages@v4" # tested with 4.0.5

... # EOF
21 changes: 10 additions & 11 deletions .github/workflows/ui.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
# yamllint disable rule:line-length


# Pin micromamba version to `1.5.10-0` because of following issue:
# https://github.com/mamba-org/setup-micromamba/issues/225

Expand All @@ -21,18 +20,18 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Conda environment
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
micromamba-version: 1.5.10-0
environment-file: conda-environment.yml
cache-environment: true
post-cleanup: "all"

- name: Cache UI dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/setup-pnpm/node_modules/.bin/store
Expand All @@ -55,18 +54,18 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Conda environment
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
micromamba-version: 1.5.10-0
environment-file: conda-environment.yml
cache-environment: true
post-cleanup: "all"

- name: Cache UI dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/setup-pnpm/node_modules/.bin/store
Expand Down Expand Up @@ -106,10 +105,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Conda environment
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
micromamba-version: 1.5.10-0
environment-file: conda-environment.yml
Expand All @@ -120,7 +119,7 @@ jobs:
run: "${MAMBA_EXE} run --name mxcubeweb poetry install --only main"

- name: Cache UI dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/setup-pnpm/node_modules/.bin/store
Expand All @@ -144,7 +143,7 @@ jobs:
env:
CYPRESS_BASE_URL: http://127.0.0.1:8081

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: debug
Expand Down

0 comments on commit cbe677f

Please sign in to comment.