Enable project sharing with Cosmograph app via new export API #199
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: Continuous Integration | |
| on: [push, pull_request] | |
| env: | |
| PROJECT_NAME: cosmograph | |
| jobs: | |
| validation: | |
| name: Validation | |
| if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10"] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Hatch | |
| run: pip install hatch | |
| - name: Run Tests | |
| run: hatch run test:pytest | |
| - name: Format Source Code | |
| uses: i2mint/isee/actions/format-source-code@master | |
| - name: Install Ruff | |
| run: pip install ruff | |
| - name: Ruff Validation | |
| run: ruff check ${{ env.PROJECT_NAME }} | |
| windows-validation: | |
| name: Windows Validation | |
| if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10"] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Hatch | |
| run: pip install hatch | |
| - name: Run Tests | |
| run: hatch run test:pytest | |
| publish: | |
| name: Publish | |
| if: "contains(github.event.head_commit.message, '[publish]') && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')" | |
| # if: "!contains(github.event.head_commit.message, '[skip ci]') && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')" | |
| needs: validation | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10"] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Hatch | |
| run: pip install hatch | |
| - name: Update Version Number | |
| run: | | |
| hatch version patch | |
| VERSION=$(hatch version) | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| - name: Package | |
| run: hatch build | |
| # Uncomment this if you need to install private dependencies from source | |
| # with: | |
| # ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| - name: Publish | |
| uses: i2mint/isee/actions/publish@master | |
| with: | |
| pypi-username: ${{ secrets.PYPI_USERNAME }} | |
| pypi-password: ${{ secrets.PYPI_PASSWORD }} | |
| - name: Check In | |
| uses: i2mint/isee/actions/check-in@master | |
| with: | |
| commit-message: "**CI** Updated version number. [skip ci]" | |
| ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| - name: Tag Repository With New Version Number | |
| uses: i2mint/isee/actions/tag-repository@master | |
| with: | |
| tag: $VERSION | |
| github-pages: | |
| name: Publish GitHub Pages | |
| if: "contains(github.event.head_commit.message, '[publish]') && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')" | |
| # if: "!contains(github.event.head_commit.message, '[skip ci]') && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')" | |
| needs: publish | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: i2mint/epythet/actions/publish-github-pages@master | |
| with: | |
| ignore: tests _dev_utils | |
| # IMPORTANT Note: You don't need to specify GITHUB_TOKEN in your repo secrets. | |
| # GITHUB_TOKEN is special & automatically provided to your workflow run. | |
| github-token: ${{ secrets.GITHUB_TOKEN }} |