Build Processing #16
Workflow file for this run
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: Processing Release | |
run-name: Build Processing | |
on: [push] | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
architecture: 'x64' | |
- name: Display Python version | |
run: python -c "import sys; print(sys.version)" | |
- run: sudo apt-get update | |
- run: python -m pip install --upgrade pip | |
- run: pip install black --upgrade | |
- name: Install dependencies | |
run: | | |
pip install pex==2.1.90 | |
pip install -r requirements.txt | |
- name: Run tests | |
run: | | |
pip install pytest | |
pytest -s | |
pex-build: | |
name: Build distribution 📦 | |
runs-on: ubuntu-latest | |
needs: | |
- tests | |
if: startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
architecture: 'x64' | |
- name: Install dependencies | |
run: | | |
pip install pex==2.1.90 | |
pip install -r requirements.txt | |
- name: Install NFPM | |
run: | | |
echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | sudo tee /etc/apt/sources.list.d/goreleaser.list | |
sudo apt update | |
sudo apt install nfpm | |
- name: Build deb | |
run: _release/build ${{ github.ref_name }} | |
- name: Upload release assets | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: 'build/*.deb' | |
allowUpdates: true |