Migrate the remaining specs and remove protractor related files #1404
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: Chaise end-to-end tests | |
on: | |
push: | |
branches: | |
- 'master' | |
pull_request: | |
branches: | |
- 'master' | |
concurrency: chaise_env | |
jobs: | |
install-and-test: | |
runs-on: ubuntu-22.04 | |
env: | |
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} | |
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} | |
SAUCE_TUNNEL_IDENTIFIER: ${{github.run_id}} | |
SHARDING: true | |
HEADLESS: false | |
PYTHONWARNINGS: ignore:Unverified HTTPS request | |
NODE_TLS_REJECT_UNAUTHORIZED: '0' | |
timeout-minutes: 150 | |
steps: | |
- name: Checkout repository code | |
uses: actions/checkout@v4 | |
with: | |
path: chaise | |
- name: Setup the system | |
run: | | |
echo "node version:" | |
node --version | |
echo "npm version:" | |
npm --version | |
echo "env variables:" | |
printenv | |
sudo timedatectl set-timezone America/Los_Angeles | |
export TZ=America/Los_Angeles | |
export PATH="$(systemd-path user-binaries):$PATH" | |
sudo apt-get -y update | |
sudo apt-get -y install libcurl4-openssl-dev libjson-c-dev | |
sudo service postgresql stop || true | |
sudo service postgresql start 12 | |
sudo apt-get install apache2 apache2-dev ssl-cert libapache2-mod-wsgi-py3 | |
sudo ln -s /etc/apache2/conf-enabled /etc/apache2/conf.d | |
sudo a2enmod ssl | |
sudo a2ensite default-ssl | |
sudo groupadd -o -g $(id -g www-data) apache | |
sudo apt-get install -y python3-setuptools python3-ply | |
sudo python3 --version | |
sudo pip3 --version | |
sudo su -c 'echo /usr/lib/python3.10/site-packages > /usr/local/lib/python3.10/dist-packages/sys-site-packages.pth' | |
sudo su -c 'python3 -c "import site;print(site.PREFIXES);"' | |
sudo su -c 'python3 -c "import site;print(site.getsitepackages())"' | |
: # the line below will make sure pyopenssl and cryptography have compatible versions | |
sudo pip3 install -U pyopenssl cryptography | |
sudo pip3 install flask | |
sudo pip3 install requests | |
sudo pip3 install globus_sdk | |
sudo pip3 install psycopg2-binary | |
sudo pip3 install oauth2client | |
sudo pip3 uninstall crypto | |
sudo pip3 uninstall pycrypto | |
sudo pip3 install pycryptodome | |
- name: Install webauthn | |
run: | | |
sudo useradd -m -r webauthn | |
sudo su -c '/usr/bin/python3 -c "import sys;import pprint;pprint.pprint(sys.path)"' - webauthn | |
git clone https://github.com/informatics-isi-edu/webauthn.git | |
cd webauthn | |
sudo make testvars | |
sudo make install | |
sudo make deploy | |
sudo bash ./test/ubuntu-travis-setup.sh | |
sudo a2enmod webauthn | |
sudo service apache2 restart | |
- name: Install hatrac | |
run: | | |
git clone https://github.com/informatics-isi-edu/hatrac.git | |
cd hatrac | |
sudo python3 ./setup.py install | |
sudo useradd -m -r hatrac | |
sudo -H -u postgres createuser -d hatrac | |
sudo -H -u postgres psql -c "GRANT webauthn TO hatrac" | |
sudo -H -u hatrac createdb hatrac | |
sudo cp test/hatrac_config.json ~hatrac/ | |
sudo -H -u hatrac hatrac-deploy admin | |
sudo su -c 'python3 -c "import hatrac as m;m.sample_httpd_config()"' - hatrac > ../wsgi_hatrac.conf | |
sudo cp ../wsgi_hatrac.conf /etc/apache2/conf.d/wsgi_hatrac.conf | |
sudo mkdir /var/www/hatrac | |
sudo chown hatrac /var/www/hatrac | |
- name: Install ermrest | |
run: | | |
git clone https://github.com/informatics-isi-edu/ermrest.git | |
cd ermrest | |
sudo -H make install PLATFORM=ubuntu1604 | |
sudo -H make deploy PLATFORM=ubuntu1604 | |
sudo bash ./test/ubuntu-travis-setup.sh | |
cd ../chaise | |
sudo cp test/ermrest_config.json /home/ermrest/ | |
sudo chmod a+r /home/ermrest/ermrest_config.json | |
sudo service apache2 restart | |
- name: Install ermrestjs | |
run: | | |
git clone https://github.com/informatics-isi-edu/ermrestjs.git | |
cd ermrestjs | |
sudo make root-install | |
- name: Install chaise | |
run: | | |
sudo mkdir -p /var/www/html/chaise | |
cd chaise | |
make deps-test | |
make dist-wo-deps | |
make lint | |
sudo make deploy | |
- name: Add tests users | |
run: | | |
sudo -H -u webauthn webauthn2-manage adduser test1 | |
sudo -H -u webauthn webauthn2-manage passwd test1 dummypassword | |
sudo -H -u webauthn webauthn2-manage addattr admin | |
sudo -H -u webauthn webauthn2-manage assign test1 admin | |
sudo -H -u webauthn webauthn2-manage adduser test2 | |
sudo -H -u webauthn webauthn2-manage passwd test2 dummypassword | |
- name: Restart apache | |
run: | | |
sudo service apache2 restart | |
- name: Run all features test spec | |
id: test-all-features | |
continue-on-error: true | |
run: | | |
cd chaise | |
make testallfeatures | |
- name: Run all features confirmation test spec | |
id: test-all-features-confirmation | |
continue-on-error: true | |
run: | | |
cd chaise | |
make testallfeaturesconfirmation | |
- name: Run default config test spec | |
id: test-default-config | |
continue-on-error: true | |
run: | | |
cd chaise | |
make testdefaultconfig | |
- name: Run delete prohibited test spec | |
id: test-delete-prohibited | |
continue-on-error: true | |
run: | | |
cd chaise | |
make testdeleteprohibited | |
- name: Check on all features test spec | |
if: always() && steps.test-all-features.outcome != 'success' | |
run: exit 1 | |
- name: Check on all features confirmation test spec | |
if: always() && steps.test-all-features-confirmation.outcome != 'success' | |
run: exit 1 | |
- name: Check on default config test spec | |
if: always() && steps.test-default-config.outcome != 'success' | |
run: exit 1 | |
- name: Check on delete prohibited test spec | |
if: always() && steps.test-delete-prohibited.outcome != 'success' | |
run: exit 1 | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-report | |
path: chaise/playwright-report/ | |
retention-days: 30 | |
- name: Diagnosis after failure | |
if: ${{ failure() }} | |
run: | | |
sudo ls -lR /etc/apache2 | |
sudo ls -lR /var/run/apache2 | |
sudo cat /etc/apache2/conf.d/webauthn.conf | |
sudo cat /etc/apache2/conf.d/wsgi_webauthn2.conf | |
sudo cat /etc/apache2/conf.d/wsgi_ermrest.conf | |
sudo cat /var/log/apache2/error.log | |
sudo cat /var/log/apache2/access.log | |
sudo -H -u webauthn psql -c 'select * from webauthn2_db.session' webauthn |