Skip to content

Commit

Permalink
Merge branch '1.2-dev' into 1694-purchase-order-example-update
Browse files Browse the repository at this point in the history
  • Loading branch information
duncandewhurst committed Dec 22, 2024
2 parents 3e6aaac + 4236b79 commit 14f6fd9
Show file tree
Hide file tree
Showing 19 changed files with 157 additions and 532 deletions.
53 changes: 11 additions & 42 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,15 @@ name: CI
on: [push, pull_request]
jobs:
build:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: pip
cache-dependency-path: '**/requirements*.txt'
# Don't install editable projects in the current working directory.
# https://pip.pypa.io/en/latest/reference/pip_install/#install-src
- run: pip install --src $GITHUB_WORKSPACE/../src -r requirements.txt
- if: github.repository == 'open-contracting/standard_profile_template'
run: make update extract
- run: make
# Disable linkcheck as it is too slow for development.
# - run: |
# make linkcheck
# rm -f output.json output.txt
uses: open-contracting/.github/.github/workflows/ci-profile.yml@main
secrets:
private-key: ${{ secrets.PRIVATE_KEY }}
elasticsearch-password: ${{ secrets.ELASTICSEARCH_PASSWORD }}
with:
path-prefix: ''
version: '1.1'
production-refs: '["refs/heads/1.0", "refs/heads/1.1"]'
# Linkcheck is slow for development.
linkcheck: false
# "ResourceWarning: unclosed file <_io.BufferedWriter name='/dev/null'>"
- run: pytest -W error -W ignore::ResourceWarning
# Deploy the built documentation to the staging directory.
- if: github.event_name == 'push'
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.PRIVATE_KEY }}
known_hosts: standard.open-contracting.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGveFGTJ9yyObNGDUCUyzyFkm6Kzh3YqIt1qB7B/KU6E
- if: github.event_name == 'push'
uses: bcomnes/netrc-creds@v3
with:
machine: standard.open-contracting.org
login: manage
password: ${{ secrets.ELASTICSEARCH_PASSWORD }}
- if: github.event_name == 'push' && success() && github.repository != 'open-contracting/standard_profile_template'
env:
PATH_PREFIX: ""
PRODUCTION: ${{ startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/latest' || github.ref == 'refs/heads/1.0' || github.ref == 'refs/heads/1.1' }}
RELEASE: ${{ startsWith(github.ref, 'refs/tags') }}
VERSION: "1.1"
shell: bash
run: curl -sS https://raw.githubusercontent.com/open-contracting/deploy/main/deploy-docs.sh | bash -
pytest-options: -W ignore::ResourceWarning
11 changes: 4 additions & 7 deletions .github/workflows/js.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: Lint JavaScript
on: [push, pull_request]
jobs:
build:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: biomejs/setup-biome@v2
- run: biome ci --indent-style=space --line-width=119 docs/_static/script.js
lint:
uses: open-contracting/.github/.github/workflows/js.yml@main
with:
filenames: docs/_static/script.js
38 changes: 8 additions & 30 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,11 @@
name: Lint
on: [push, pull_request]
env:
BASEDIR: https://raw.githubusercontent.com/open-contracting/standard-maintenance-scripts/main
jobs:
build:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
env:
PAT: ${{ secrets.PAT }}
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.PAT || github.token }}
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: pip
cache-dependency-path: '**/requirements*.txt'
- id: changed-files
uses: tj-actions/changed-files@v45
- uses: pre-commit/[email protected]
continue-on-error: true
with:
extra_args: pip-compile --files ${{ steps.changed-files.outputs.all_changed_files }}
- if: ${{ env.PAT }}
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: '[github-actions] pre-commit autoupdate'
- shell: bash
run: curl -s -S --retry 3 $BASEDIR/tests/install.sh | bash -
- shell: bash
run: curl -s -S --retry 3 $BASEDIR/tests/script.sh | bash -
lint:
uses: open-contracting/.github/.github/workflows/lint.yml@main
permissions:
contents: write
secrets:
personal-access-token: ${{ secrets.PAT }}
with:
python-version: '3.10'
13 changes: 2 additions & 11 deletions .github/workflows/shell.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
name: Lint Shell
on: [push, pull_request]
jobs:
build:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
sudo apt update
sudo apt install devscripts shellcheck shfmt
- run: checkbashisms $(shfmt -f .)
- run: shellcheck $(shfmt -f .)
- run: shfmt -d -i 4 -sr $(shfmt -f .)
lint:
uses: open-contracting/.github/.github/workflows/shell.yml@main
15 changes: 5 additions & 10 deletions .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
name: Spell-check
on: [push, pull_request]
jobs:
build:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- run: pip install codespell
- run: codespell -S .git,docson,locale,examples,country.csv,currency.csv,language.csv,mediaType.csv -L fo,sme,zar,SME .
lint:
uses: open-contracting/.github/.github/workflows/spellcheck.yml@main
with:
ignore: fo,sme,zar
skip: docson,locale,examples,country.csv,currency.csv,language.csv,mediaType.csv
4 changes: 2 additions & 2 deletions common-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ myst-parser==0.18.1
# via -r common-requirements.in
ocds-babel==0.3.6
# via -r common-requirements.in
ocdsextensionregistry==0.5.0
ocdsextensionregistry==0.6.5
# via -r common-requirements.in
ocdsindex==0.2.0
# via -r common-requirements.in
Expand Down Expand Up @@ -158,7 +158,7 @@ sphinxcontrib-qthelp==1.0.3
# via sphinx
sphinxcontrib-serializinghtml==1.1.5
# via sphinx
standard-theme @ git+https://github.com/open-contracting/standard_theme.git@07ca0e39979a244656dd6df0658f2ead428184b9#egg=standard_theme
standard-theme @ git+https://github.com/open-contracting/standard_theme.git@5de343d1d8e342b5f2a42c6132db37aebe382e36#egg=standard_theme
# via -r common-requirements.in
starlette==0.40.0
# via sphinx-autobuild
Expand Down
Loading

0 comments on commit 14f6fd9

Please sign in to comment.