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

chore: pin ubuntu runner images #731

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/create-jira-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:

jobs:
create-jira-release:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
Expand Down
82 changes: 41 additions & 41 deletions .github/workflows/docs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,46 +8,46 @@ on:

jobs:
publish-docs:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

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

- name: Install Poetry
run: pipx install poetry

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: 'poetry'

- name: Check pyproject.toml validity
run: poetry check --no-interaction

- name: Install deps
run: poetry install --no-interaction
- name: Generate CLI reference
run: |
cd src
poetry run python generate_docs.py > ../docs/docs/about/getting_started/cli/cli_reference.md

- name: Generate JSON Schema
run: |
cd src
poetry run python generate_json_schema.py > ../docs/docs/about/getting_started/yaml/ecalc_json_schema.json

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: docs/package-lock.json

- name: Install dependencies and test by building website
run: |
cd docs
npm ci --ignore-scripts
npm run build
- name: Checkout code
uses: actions/checkout@v4

- name: Install Poetry
run: pipx install poetry

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: 'poetry'

- name: Check pyproject.toml validity
run: poetry check --no-interaction

- name: Install deps
run: poetry install --no-interaction

- name: Generate CLI reference
run: |
cd src
poetry run python generate_docs.py > ../docs/docs/about/getting_started/cli/cli_reference.md

- name: Generate JSON Schema
run: |
cd src
poetry run python generate_json_schema.py > ../docs/docs/about/getting_started/yaml/ecalc_json_schema.json

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: docs/package-lock.json

- name: Install dependencies and test by building website
run: |
cd docs
npm ci --ignore-scripts
npm run build
90 changes: 45 additions & 45 deletions .github/workflows/docs-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,62 +11,62 @@ env:

jobs:
publish-docs:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

environment:
name: docs-prod

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

- name: Install Poetry
run: pipx install poetry
- name: Install Poetry
run: pipx install poetry

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: 'poetry'
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: 'poetry'

- name: Check pyproject.toml validity
run: poetry check --no-interaction
- name: Check pyproject.toml validity
run: poetry check --no-interaction

- name: Install deps
run: poetry install --no-interaction
- name: Install deps
run: poetry install --no-interaction

- name: Generate CLI reference
run: |
cd src
poetry run python generate_docs.py > ../docs/docs/about/getting_started/cli/cli_reference.md
- name: Generate CLI reference
run: |
cd src
poetry run python generate_docs.py > ../docs/docs/about/getting_started/cli/cli_reference.md

- name: Generate JSON Schema
run: |
cd src
poetry run python generate_json_schema.py > ../docs/docs/about/getting_started/yaml/ecalc_json_schema.json
- name: Generate JSON Schema
run: |
cd src
poetry run python generate_json_schema.py > ../docs/docs/about/getting_started/yaml/ecalc_json_schema.json

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: docs/package-lock.json
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: docs/package-lock.json

- name: Install dependencies and build website
run: |
cd docs
npm ci --ignore-scripts
npm run build
- name: Install dependencies and build website
run: |
cd docs
npm ci --ignore-scripts
npm run build

- name: Push static files to Github Pages branch
run: |
cd docs/build
CREATED_FROM_REF=$(git rev-parse --short HEAD)
git init
git config user.name "GitHub Actions Bot"
git config user.email "<>"
git checkout -b $GITHUB_PAGES_BRANCH
git remote add $GITHUB_PAGES_BRANCH https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/equinor/ecalc
git add .
git commit -m "Built from commit '$CREATED_FROM_REF'"
git push -f --set-upstream gh-pages gh-pages
- name: Push static files to Github Pages branch
run: |
cd docs/build
CREATED_FROM_REF=$(git rev-parse --short HEAD)
git init
git config user.name "GitHub Actions Bot"
git config user.email "<>"
git checkout -b $GITHUB_PAGES_BRANCH
git remote add $GITHUB_PAGES_BRANCH https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/equinor/ecalc
git add .
git commit -m "Built from commit '$CREATED_FROM_REF'"
git push -f --set-upstream gh-pages gh-pages
4 changes: 2 additions & 2 deletions .github/workflows/examples-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
run-tests:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -28,7 +28,7 @@ jobs:
run: poetry install --no-interaction --all-extras

- name: Convert example Jupyter notebooks to Python code
run : poetry run jupyter nbconvert --to python examples/*.ipynb
run: poetry run jupyter nbconvert --to python examples/*.ipynb

# This will not log any tests per se, but it will fail if there are any errors raised in the generated Python files.
- name: Run tests
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lib-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ env:
jobs:

run-tests-with-coverage:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]
python-version: [ "3.11", "3.12", "3.13" ]
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/on-push-main-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:

deploy-dummy:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
environment:
name: libecalc-test
steps:
Expand All @@ -24,14 +24,14 @@ jobs:
uses: ./.github/workflows/docs-publish.yml
secrets: inherit

# We want/need to reserve patch bump in case we need to
# patch a release that is deployed and active. Therefore
# we bump minor here. Major bumps to versioning is currently
# reserved to manual invocation of release-please.
# We want/need to reserve patch bump in case we need to
# patch a release that is deployed and active. Therefore
# we bump minor here. Major bumps to versioning is currently
# reserved to manual invocation of release-please.

release-please:
uses: ./.github/workflows/release-please.yml
with:
versioning_strategy: 'always-bump-minor'
secrets: inherit
needs: [lib-ci]
needs: [ lib-ci ]
2 changes: 1 addition & 1 deletion .github/workflows/pre-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
pre-commit: # Static analyzers, formatters and verifying pre-commit hooks has been run for both API and Web
name: Build & Run Pre Commit hooks to verify code structure, quality etc. from pre-commit hooks
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
publish:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ env:
jobs:
release-please:
permissions: write-all
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: google-github-actions/release-please-action@v3
id: release
Expand All @@ -47,8 +47,8 @@ jobs:
- name: Create vX.Y release branch (for simpler patching) - if normal release (not patching)
if: ${{ steps.release.outputs.release_created && env.VERSIONING_STRATEGY != 'always-bump-patch' }}
run: |
git checkout -b release/v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} ${{ steps.release.outputs.sha }}
git push -u origin release/v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}
git checkout -b release/v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} ${{ steps.release.outputs.sha }}
git push -u origin release/v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
Expand All @@ -61,7 +61,7 @@ jobs:
needs: release-please
uses: equinor/ecalc/.github/workflows/publish.yml@main
secrets:
pypi_token: ${{ secrets.PYPI_TOKEN }}
pypi_token: ${{ secrets.PYPI_TOKEN }}
if: ${{ needs.release-please.outputs.release_created }}

create-jira-release:
Expand Down