Make publisher info vendor specific #3155
Workflow file for this run
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: Tests | |
| on: | |
| push: | |
| pull_request: | |
| schedule: | |
| - cron: '0 6 * * *' | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows-latest, ubuntu-latest, macos-latest] | |
| python: ['3.9', '3.10', '3.11', '3.12'] | |
| vendored_env: [unvendored] | |
| include: | |
| - os: ubuntu-latest | |
| python: '3.9' | |
| vendored_env: dandi | |
| instance_name: DANDI | |
| doi_prefix: '10.80507' | |
| - os: ubuntu-latest | |
| python: '3.9' | |
| vendored_env: ember-dandi | |
| instance_name: EMBER-DANDI | |
| doi_prefix: '10.82754' | |
| - os: ubuntu-latest | |
| python: '3.9' | |
| vendored_env: ember-dandi-no-doi | |
| instance_name: EMBER-DANDI | |
| steps: | |
| - name: Set up environment | |
| uses: actions/checkout@v4 | |
| with: | |
| # Fetch all commits so that versioningit will return something | |
| # compatible with semantic-version | |
| fetch-depth: 0 | |
| - name: Set up Python ${{ matrix.python }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip wheel | |
| python -m pip install --upgrade tox | |
| # Set only if matrix.instance_name is defined | |
| - name: Set DANDI_INSTANCE_NAME | |
| if: ${{ matrix.instance_name }} | |
| run: echo "DANDI_INSTANCE_NAME=${{ matrix.instance_name }}" >> "$GITHUB_ENV" | |
| # Set only if matrix.doi_prefix is defined | |
| - name: Set DANDI_DOI_PREFIX | |
| if: ${{ matrix.doi_prefix }} | |
| run: echo "DANDI_DOI_PREFIX=${{ matrix.doi_prefix }}" >> "$GITHUB_ENV" | |
| - name: Set DANDI DataCite credentials | |
| if: ${{ matrix.vendored_env == 'dandi' }} | |
| run: | | |
| echo "DATACITE_DEV_LOGIN=${{ secrets.DATACITE_DEV_DANDI_LOGIN }}" >> "$GITHUB_ENV" | |
| echo "DATACITE_DEV_PASSWORD=${{ secrets.DATACITE_DEV_DANDI_PASSWORD }}" >> "$GITHUB_ENV" | |
| - name: Set EMBER DataCite credentials | |
| if: ${{ matrix.vendored_env == 'ember-dandi' }} | |
| run: | | |
| echo "DATACITE_DEV_LOGIN=${{ secrets.DATACITE_DEV_EMBER_LOGIN }}" >> "$GITHUB_ENV" | |
| echo "DATACITE_DEV_PASSWORD=${{ secrets.DATACITE_DEV_EMBER_PASSWORD }}" >> "$GITHUB_ENV" | |
| - name: Run all tests | |
| env: | |
| NO_ET: 1 | |
| run: tox -e py -- -s --cov-report=xml | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| file: ./coverage.xml | |
| flags: unittests | |
| # name: codecov-umbrella | |
| # yml: ./codecov.yml | |
| fail_ci_if_error: false | |
| token: ${{ secrets.CODECOV_TOKEN }} |