A push event from mccroweyclinton-EPA caused a rebuilding and retesting of the pyaqsapi package via GitHub actions #10
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: build_and_test_pyaqsapi | |
run-name: A push event from ${{ github.actor }} caused a rebuilding and retesting of the pyaqsapi package via GitHub actions | |
on: | |
push: | |
branches: | |
- main | |
- github_workflow | |
pull_request: | |
branches: | |
- main | |
- github_workflow | |
jobs: | |
setup_environment: | |
runs-on: ubuntu-latest | |
env: | |
AQSkey: ${{ secrets.AQSKEY }} | |
AQSuser: ${{ secrets.AQSUSER }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: "pip" | |
- name: Activate Conda environment | |
run: | | |
eval "$(conda shell.bash hook)" | |
conda activate setuppyaqsapi | |
- name: install_dependencies | |
run: | | |
conda config --add channels conda-forge | |
conda update --yes conda | |
conda install --yes conda-libmamba-solver | |
conda config --set solver libmamba | |
conda env update --file=environment.yml -vv | |
#echo "source activate base" >> ~/.bashrc | |
#source ~/.bashrc | |
- name: Display Python and sphinx version and system info | |
run: | | |
python -c "import platform; print(platform.uname())" | |
sphinx-build --version | |
- name: build and install pyaqsapi in a test environment | |
run: | | |
python -m build . | |
pip install . | |
- name: build apidocs | |
run: | | |
cd docs | |
make clean | |
sphinx-apidoc --ext-autodoc -o . ../pyaqsapi/ | |
make html | |
- name: test_package | |
env: | |
AQSkey: ${{ secrets.AQSKEY }} | |
AQSuser: ${{ secrets.AQSUSER }} | |
run: pytest |