feat: magic eden: parametrize listing/offers max limits #838
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: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: [ master ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python 3.9 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.9' | |
| - name: Restore cache | |
| uses: actions/cache@v3 | |
| id: pip-cache | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install . | |
| - name: Run Black | |
| uses: psf/black@stable | |
| - name: Run unit tests | |
| run: | | |
| TZ=UTC pytest -m "not integration" | |
| check-imports: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Run grep to find imports from build folder. | |
| run: | | |
| if grep -rE '^from build\..*' blockapi; then | |
| echo "Error: found disallowed imports starting with 'from build.'" | |
| exit 1 | |
| fi; | |
| shell: bash | |
| version: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.update_version.outputs.version }} | |
| needs: test | |
| if: ${{ success() && github.ref == 'refs/heads/master' }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python 3.9 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.9' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install python-semantic-release | |
| - name: Configure git | |
| run: | | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "GitHub Action" | |
| - name: Update version | |
| id: update_version | |
| run: | | |
| VER=$(semantic-release --noop version --print) | |
| if [ ! -z "$VER" ]; then | |
| semantic-release version --changelog --no-commit --no-push --no-vcs-release | |
| git commit -m "${VER}" -a | |
| git tag -d "v${VER}" || true | |
| git tag "v${VER}" | |
| fi | |
| echo "version=$VER" >> $GITHUB_OUTPUT | |
| - name: Push changes | |
| uses: ad-m/github-push-action@master | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| branch: ${{ github.ref }} | |
| tags: true | |
| release: | |
| runs-on: ubuntu-latest | |
| needs: version | |
| concurrency: release | |
| if: ${{ success() && github.ref == 'refs/heads/master' && needs.version.outputs.version != '' }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| ref: 'master' | |
| fetch-depth: 0 | |
| - name: Verify tag | |
| run: | |
| VER=$(git tag --points-at HEAD) | |
| [ -z "$VER" ] && grep -q "__version__ = \"${VER/v}\"" setup.py || true | |
| - name: Set up Python 3.9 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.9' | |
| - name: Restore cache | |
| uses: actions/cache@v3 | |
| id: pip-cache | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install . | |
| pip install wheel twine | |
| - name: Build | |
| run: | | |
| rm -f dist/* | |
| python setup.py sdist bdist_wheel | |
| - name: Publish package to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| user: __token__ | |
| password: ${{ secrets.PYPI_TOKEN }} |