feat: add justfile, setup CI #12
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: Python CI | |
on: | |
push: | |
branches: [ main 'chris/20230914-python-ci' ] | |
pull_request: | |
branches: [ main, 'chris/20230914-python-ci' ] | |
jobs: | |
python: | |
name: Python Test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
rust: | |
- stable | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- uses: extractions/setup-just@v1 | |
- name: download extism development release | |
run: | | |
set -eou pipefail | |
arch="$(<<<'${{ runner.arch }}' sed -e 's/ARM64/aarch64/g')" | |
arch="${arch/X64/x86_64}" | |
os="$(<<<'${{ runner.os }}' tr '[:upper:]' '[:lower:]')" | |
echo "attempting to download 'libextism-${arch}-${os}-*.tar.gz'" | |
gh release -R extism/extism download latest -p "libextism-${arch}-${os}-*.tar.gz" | |
tar zxfv *.tar.gz | |
sudo mv libextism.so /usr/local/lib/ | |
sudo mv extism.h /usr/local/include/ | |
env: | |
GH_TOKEN: ${{ github.token }} | |
- name: Run Python lint | |
run: | | |
just lint | |
- name: Run Python tests | |
run: | | |
just test | |
- name: Run Python docs | |
run: | | |
just docs |