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

Clarify contracts description #1357

Closed
wants to merge 13 commits into from
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
85 changes: 46 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,51 @@ 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@v2
with:
submodules: true
- uses: actions/setup-python@v1
with:
python-version: 3.6
- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
# 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
# Google Chrome and ChromeDriver are already included.
# https://help.github.com/en/actions/reference/software-installed-on-github-hosted-runners
- name: Make
run: |
if [ $GITHUB_REPOSITORY = 'open-contracting/standard_profile_template' ]; then python schema/build-profile.py; make extract; fi
make
python util/add_translation_notes.py
- run: pytest
- uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.PRIVATE_KEY }}
known_hosts: standard.open-contracting.org ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDWLziEiV46d9iInFXAR/PxPvotcpmMtbwO8GkTF2/AFUkyiSd8/Yg5HXUoWBz7hbRwg2O+q5F1QfD57vevBV7c+JKyBbKVOi/mXaf7uACxer419RTgKcpaMhNRi708XWhNlWiKp3Afs/MDMvMdWSrU+Ht7biNb1OMGjfNMDdlsJxPycxMQ7Fu7i+kdyMkKLYDIHNeEw0aW9PtMTReUE0y/Ghn44PDR2u9/oZsEhC0ELDQUfsjtCcoM91FH1tjRBZkOW/j5940nMoJpbVhFHTC3YY9Mh2kV+N6Whht5nghJ7Jl2vN5W0Uer+TNMVRV4QMu8xK5HXbjKFMpaK+j4gBs9
- uses: little-core-labs/[email protected]
with:
creds: |
[{
"machine": "standard.open-contracting.org",
"login": "manage",
"password": "${{ secrets.ELASTICSEARCH_PASSWORD }}"
}]
- if: success()
env:
PATH_PREFIX: ''
run: curl -Ss https://raw.githubusercontent.com/open-contracting/deploy/master/deploy-docs.sh | bash -
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-python@v1
with:
python-version: 3.6
- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
# 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
# Google Chrome and ChromeDriver are already included.
# https://help.github.com/en/actions/reference/software-installed-on-github-hosted-runners
- if: github.repository == 'open-contracting/standard_profile_template'
run: make update extract
- run: |
make
python manage.py add-translation-notes
- run: |
make linkcheck
rm -f output.json output.txt
- run: pytest
# 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-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDWLziEiV46d9iInFXAR/PxPvotcpmMtbwO8GkTF2/AFUkyiSd8/Yg5HXUoWBz7hbRwg2O+q5F1QfD57vevBV7c+JKyBbKVOi/mXaf7uACxer419RTgKcpaMhNRi708XWhNlWiKp3Afs/MDMvMdWSrU+Ht7biNb1OMGjfNMDdlsJxPycxMQ7Fu7i+kdyMkKLYDIHNeEw0aW9PtMTReUE0y/Ghn44PDR2u9/oZsEhC0ELDQUfsjtCcoM91FH1tjRBZkOW/j5940nMoJpbVhFHTC3YY9Mh2kV+N6Whht5nghJ7Jl2vN5W0Uer+TNMVRV4QMu8xK5HXbjKFMpaK+j4gBs9
- if: github.event_name == 'push'
uses: little-core-labs/[email protected]
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"
run: curl -sS https://raw.githubusercontent.com/open-contracting/deploy/main/deploy-docs.sh | bash -
13 changes: 7 additions & 6 deletions .github/workflows/js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ 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@v2
- uses: actions/setup-node@v1
with:
node-version: 14.x
- run: npm install standard
- run: npx standard docs/_static/json-example-format.js docs/_static/extensions.js
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14.x
- run: npm install standard
- run: npx standard docs/_static/script.js
33 changes: 18 additions & 15 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
name: Lint
on: [push, pull_request]
env:
BASEDIR: https://raw.githubusercontent.com/open-contracting/standard-maintenance-scripts/master
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
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: 3.6
- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('.github/workflows/lint.yml') }}
restore-keys: |
${{ runner.os }}-pip-
- run: curl -s -S --retry 3 $BASEDIR/tests/install.sh | bash -
- run: sudo apt-get install shellcheck
- run: curl -s -S --retry 3 $BASEDIR/tests/script.sh | bash -
- run: shellcheck script/*
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: 3.6
- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('.github/workflows/lint.yml') }}
restore-keys: |
${{ runner.os }}-pip-
- run: curl -s -S --retry 3 $BASEDIR/tests/install.sh | bash -
- run: sudo apt-get install shellcheck
- run: sudo snap install shfmt
- run: curl -s -S --retry 3 $BASEDIR/tests/script.sh | bash -
- run: shellcheck $(shfmt -f .)
- run: shfmt -d -i 4 -sr $(shfmt -f .)
Loading