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: Tests (install w/ pinned env) | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install micromamba | |
uses: mamba-org/provision-with-micromamba@main | |
with: | |
environment-file: salmon.lock.yml | |
- name: Debug info | |
shell: bash -l {0} | |
run: | | |
echo " which {python, pip, pytest}" | |
which python | |
which pip | |
echo " sudo dollar sigh which {python, pip, pytest}" | |
sudo echo $(which python) | |
sudo echo $(which pip) | |
sudo echo $(which pytest) | |
echo " sudo which {python, pip, pytest}" | |
sudo which python | |
sudo which pip | |
echo " Running pwd..." | |
pwd | |
echo " Running echo $USER..." | |
echo $USER | |
echo " Running chown..." | |
sudo chown -R -H -L $USER:$USER /home/runner/work/salmon/ | |
chown -R -H -L $USER:$USER /home/runner/work/salmon/ | |
echo " Running chmod..." | |
sudo chmod -R 777 /home/runner/work/salmon/ | |
echo " Running `ls`..." | |
ls | |
- name: Prepare for docker build... | |
shell: bash -l {0} | |
run: | | |
chmod +x launch.sh | |
# chown -R -H -L $USER:$USER . | |
sudo chown -R -H -L $USER:$USER . | |
sudo chown -R -H -L $USER:$USER salmon docs tests | |
- name: Install Salmon | |
shell: bash -l {0} | |
run: | | |
sudo $(which pip) install . | |
sudo $(which pip) install pytest | |
- name: Run tests in salmon/salmon/ | |
shell: bash -l {0} | |
run: | | |
sudo $(which pytest) salmon/ | |
- uses: docker/setup-buildx-action@v1 | |
with: | |
driver: docker | |
- name: Build Salmon server w/ Docker | |
env: | |
SALMON_NO_AUTH: 1 | |
run: | | |
sudo --preserve-env=SALMON_NO_AUTH docker-compose up & | |
until curl 127.0.0.1:8421 > /dev/null 2>&1; do :; done # wait for container to start | |
sudo docker ps | |
- name: Run all tests | |
shell: bash -l {0} | |
run: | | |
# sudo docker-compose logs -f & # if debugging; shows logs | |
sudo $(which pytest) |