-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub Actions workflow to run tests
- Loading branch information
Showing
2 changed files
with
78 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: Test just.sh | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags-ignore: | ||
- '*.*.*' | ||
workflow_dispatch: | ||
workflow_call: | ||
|
||
permissions: | ||
contents: read | ||
|
||
env: | ||
JUST_VERSION: '1.17.0' | ||
|
||
defaults: | ||
run: | ||
shell: bash -euxo pipefail {0} | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
- name: Install Python dependencies | ||
run: | | ||
python3 -m pip install .[test] | ||
- name: Install Just on Linux | ||
run: | | ||
curl -L "https://github.com/casey/just/releases/download/${JUST_VERSION}/just-${JUST_VERSION}-x86_64-unknown-linux-musl.tar.gz" \ | ||
| sudo tar -C /usr/local/bin -xzv just | ||
- name: Lint | ||
run: | | ||
just lint | ||
test: | ||
name: Run all tests | ||
needs: lint | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] | ||
include: | ||
- os: macos-latest | ||
python-version: '3.8' | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Python dependencies | ||
run: | | ||
python3 -m pip install .[test] | ||
- name: Install Just on macOS | ||
if: ${{ matrix.os == 'macos-latest' }} | ||
run: | | ||
curl -L "https://github.com/casey/just/releases/download/${JUST_VERSION}/just-${JUST_VERSION}-x86_64-apple-darwin.tar.gz" \ | ||
| sudo tar -C /usr/local/bin -xzv just | ||
- name: Install Just on Linux | ||
if: ${{ matrix.os == 'ubuntu-latest' }} | ||
run: | | ||
curl -L "https://github.com/casey/just/releases/download/${JUST_VERSION}/just-${JUST_VERSION}-x86_64-unknown-linux-musl.tar.gz" \ | ||
| sudo tar -C /usr/local/bin -xzv just | ||
- name: Run tests | ||
run: | | ||
just test |
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