Add check to prevent upload of non-package files (#43) #205
This file contains 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: CI | |
on: push | |
defaults: | |
run: | |
shell: bash -l {0} | |
jobs: | |
list_quetz_server_versions: | |
name: List Quetz server versions | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- id: list_versions | |
run: | | |
set -eux | |
echo "versions=$(jq --raw-input --slurp 'split("\n")' -c .quetz-server-versions)" >> $GITHUB_OUTPUT | |
outputs: | |
versions: ${{ steps.list_versions.outputs.versions }} | |
pytest: | |
strategy: | |
matrix: | |
quetz_server_version: "${{fromJSON(needs.list_quetz_server_versions.outputs.versions)}}" | |
name: Run pytest | |
runs-on: ubuntu-latest | |
needs: | |
- list_quetz_server_versions | |
steps: | |
- uses: actions/[email protected] | |
- name: Install mamba & create environment | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: environment.yml | |
cache-environment: true | |
create-args: >- | |
pytest-md | |
pytest-emoji | |
quetz==${{ matrix.quetz_server_version }} | |
- name: Install quetz-client | |
run: | | |
pip install -e . | |
- name: Run pytest | |
uses: pavelzw/pytest-action@v2 | |
with: | |
verbose: true | |
emoji: true | |
job-summary: true | |
click-to-expand: true | |
pre-commit: | |
name: Run pre-commit | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
env: | |
PRE_COMMIT_USE_MICROMAMBA: 1 | |
steps: | |
- name: Checkout branch | |
uses: actions/[email protected] | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Set up micromamba | |
uses: mamba-org/setup-micromamba@2b72821d5ad7f6da3c003a3684ce341bf187b46f | |
- name: Add micromamba to GITHUB_PATH | |
run: echo "${HOME}/micromamba-bin" >> "$GITHUB_PATH" | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Run pre-commit checks | |
uses: pre-commit/[email protected] | |
check-release: | |
name: Check release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout branch | |
uses: actions/[email protected] | |
- name: Install Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Install missing dependency | |
run: pip install ipython_genutils | |
- name: Check Release | |
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} |