Add GitHub action testing #4
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: Clean install | ||
on: | ||
push: | ||
branches: [ "github-main" ] | ||
pull_request: | ||
branches: [ "github-main" ] | ||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
python-version: ["3.9", "3.10", "3.11"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install | ||
run: python -m pip install . | ||
- name: List environment | ||
run: python -m pip list installed | ||
- name: Test imports | ||
run: | | ||
python -c "import bilby" | ||
python -c "import bilby.bilby_mcmc" | ||
python -c "import bilby.core" | ||
python -c "import bilby.core.prior" | ||
python -c "import bilby.core.sampler" | ||
python -c "import bilby.core.utils" | ||
python -c "import bilby.gw" | ||
python -c "import bilby.gw.detector" | ||
python -c "import bilby.gw.eos" | ||
python -c "import bilby.gw.likelihood" | ||
python -c "import bilby.gw.sampler" | ||
python -c "import bilby.hyper" | ||
python -c "import cli_bilby" | ||
python test/import_test.py | ||
- name: Test executables | ||
# I don't understand windows shell commands | ||
if: matrix.os != "windows-latest" | ||
Check failure on line 45 in .github/workflows/basic-install.yml GitHub Actions / Clean installInvalid workflow file
|
||
run: | | ||
for script in $(pip show -f bilby | grep "bin\/" | xargs -I {} basename {}); do | ||
${script} --help; | ||
done |