Skip to content

Commit

Permalink
Separate out database and package
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-riggs committed Aug 23, 2024
1 parent e921aaf commit e4a8a95
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ jobs:
name: package-distributions
path: dist/

- name: Get database
uses: actions/download-artifact@v4
with:
name: database
path: database/

- uses: shogo82148/actions-setup-mysql@v1
with:
distribution: 'mariadb'
Expand All @@ -58,7 +64,7 @@ jobs:
cp "./conf/config.example.cfg" "./conf/config.cfg"
cp "./conf/ws_config.example.cfg" "./conf/ws_config.cfg"
tar xfz "dist/ispyb-database.tar.gz"
tar xfz "database/ispyb-database.tar.gz"

printf 'Waiting for MySQL database to accept connections'
until mariadb --defaults-file=.my.cnf -e "SHOW DATABASES" >/dev/null; do printf '.'; sleep 10; done
Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/test-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,19 @@ jobs:
pip install -U pip
pip install collective.checkdocs wheel
- name: Build python package
run: |
set -ex
python setup.py sdist bdist_wheel
mkdir -p dist/pypi
shopt -s extglob
mv -v dist/!(pypi) dist/pypi
git archive HEAD | gzip > dist/repo-source.tar.gz
ls -laR dist
run: python3 -m build
- name: Download ISPyB DB schema v${{ env.DATABASE_SCHEMA }} for tests
run: wget -t 3 --waitretry=20 https://github.com/DiamondLightSource/ispyb-database/releases/download/v${{ env.DATABASE_SCHEMA }}/ispyb-database-${{ env.DATABASE_SCHEMA }}.tar.gz -O dist/ispyb-database.tar.gz
- name: Store artifact
run: wget -t 3 --waitretry=20 https://github.com/DiamondLightSource/ispyb-database/releases/download/v${{ env.DATABASE_SCHEMA }}/ispyb-database-${{ env.DATABASE_SCHEMA }}.tar.gz -O database/ispyb-database.tar.gz
- name: Store built package artifact
uses: actions/upload-artifact@v4
with:
name: package-distributions
path: dist/
- name: Store database artifact
uses: actions/upload-artifact@v4
with:
name: database
path: database/
- name: Check package description
run: python setup.py checkdocs

Expand Down

0 comments on commit e4a8a95

Please sign in to comment.