CI: docker-compose v1 → docker compose v2 (Ubuntu 24.04 removed v1) #120
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: Development | |
| on: | |
| push: | |
| branches: | |
| - '**' # every branch | |
| - '!stage*' # exclude branches beginning with stage | |
| pull_request: | |
| branches: | |
| - '**' # every branch | |
| - '!stage*' # exclude branches beginning with stage | |
| jobs: | |
| test: | |
| if: github.event_name == 'push' || github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| matlab_version: ["R2019a"] | |
| mysql_version: ["8.0.18", "5.7", "5.6"] | |
| # include: | |
| # - matlab_version: "R2018b" | |
| # mysql_version: "5.7" | |
| # - matlab_version: "R2016b" | |
| # mysql_version: "5.7" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Run primary tests | |
| env: | |
| MATLAB_UID: "1001" | |
| MATLAB_GID: "116" | |
| MATLAB_USER: ${{ secrets.matlab_user }} | |
| MATLAB_HOSTID: ${{ secrets.matlab_hostid }} | |
| MATLAB_VERSION: ${{ matrix.matlab_version }} | |
| MYSQL_TAG: ${{ matrix.mysql_version }} | |
| MINIO_VER: RELEASE.2022-01-03T18-22-58Z | |
| MATLAB_LICENSE: ${{ secrets[format('matlab_license_{0}', matrix.matlab_version)] }} | |
| DOCKER_CLIENT_TIMEOUT: "120" | |
| COMPOSE_HTTP_TIMEOUT: "120" | |
| run: | | |
| docker compose -f LNX-docker-compose.yaml up --build --exit-code-from app | |
| - name: Add toolbox artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dj-toolbox-${{matrix.matlab_version}} | |
| path: DataJoint.mltbx | |
| retention-days: 1 | |
| publish-docs: | |
| if: | | |
| github.event_name == 'push' && | |
| startsWith(github.ref, 'refs/tags') | |
| needs: test | |
| runs-on: ubuntu-latest | |
| env: | |
| DOCKER_CLIENT_TIMEOUT: "120" | |
| COMPOSE_HTTP_TIMEOUT: "120" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Deploy docs | |
| run: | | |
| export MODE=BUILD | |
| export PACKAGE=datajoint | |
| export UPSTREAM_REPO=https://github.com/${GITHUB_REPOSITORY}.git | |
| export HOST_UID=$(id -u) | |
| docker compose -f docs/docker-compose.yaml up --exit-code-from docs --build | |
| git push origin gh-pages |