update overview of available software #80
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test overview of available software in EESSI | |
| on: | |
| push: | |
| paths: | |
| - ".github/**" | |
| - "docs/available_software/data/**" | |
| jobs: | |
| check_targets: | |
| name: check targets in overview.md and json_data.json | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
| - name: set up Python | |
| uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 | |
| with: | |
| python-version: '3.10' | |
| architecture: x64 | |
| - name: test overview available software | |
| id: test_overview_available_software | |
| run: | | |
| # install required Python packages in virtual environment | |
| python -m venv venv | |
| . venv/bin/activate | |
| pip install -r scripts/available_software/requirements.txt | |
| # download https://eessi.io/api_data/data/eessi_api_metadata_software.json | |
| # to where it's expected by docs/available_software/macros.py and scripts/available_software/available_software.py | |
| data_dir="docs/available_software/data" | |
| mkdir -p ${data_dir} | |
| cd ${data_dir} | |
| curl -OL https://eessi.io/api_data/data/eessi_api_metadata_software.json | |
| cd - | |
| python scripts/available_software/available_software.py | |
| ./scripts/update_generated_time.sh mkdocs.yml | |
| # determine whether pull request would need to be opened: | |
| # if detailed software pages in docs/available_software/detail have been updated, then a PR should be opened | |
| if [[ $(git status --porcelain ./docs/available_software/detail) ]]; then | |
| echo "Software pages have been changed, PR should be opened" | |
| git diff ./docs/available_software/detail | |
| else | |
| echo "Software pages have not been changed, no need to open PR" | |
| fi |