Mercurial > p > roundup > code
comparison .github/workflows/ci-test.yml @ 6861:097578791f7b
mysql verbose and remove -u
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Wed, 31 Aug 2022 23:19:49 -0400 |
| parents | 69928bcce59d |
| children | 7d34cdb6c116 |
comparison
equal
deleted
inserted
replaced
| 6860:69928bcce59d | 6861:097578791f7b |
|---|---|
| 42 with: | 42 with: |
| 43 python-version: ${{ matrix.python-version }} | 43 python-version: ${{ matrix.python-version }} |
| 44 | 44 |
| 45 # Display the Python version being used | 45 # Display the Python version being used |
| 46 - name: Display Python version | 46 - name: Display Python version |
| 47 run: python -c "import sys; print(sys.version)"; echo $PYTHON_VERSION | 47 run: python -c "import sys; print(sys.version)" |
| 48 | 48 |
| 49 # Install the databases | 49 # Install the databases |
| 50 - name: Install postgres | 50 - name: Install postgres |
| 51 run: | | 51 run: | |
| 52 sudo apt-get install postgresql | 52 sudo apt-get install postgresql |
| 56 # set up postgresql database | 56 # set up postgresql database |
| 57 sudo -u postgres psql -c "CREATE ROLE rounduptest WITH CREATEDB LOGIN PASSWORD 'rounduptest';" -U postgres | 57 sudo -u postgres psql -c "CREATE ROLE rounduptest WITH CREATEDB LOGIN PASSWORD 'rounduptest';" -U postgres |
| 58 | 58 |
| 59 - name: Install mysql/mariadb | 59 - name: Install mysql/mariadb |
| 60 run: | | 60 run: | |
| 61 sh -xv | |
| 61 sudo apt-get install mysql-server mysql-client | 62 sudo apt-get install mysql-server mysql-client |
| 62 # set up mysql database | 63 # set up mysql database |
| 63 sudo sed -i -e '/^\[mysqld\]/,/^\[mysql/s/^max_allowed_packet.*/max_allowed_packet = 500M/' /etc/mysql/my.cnf | 64 sudo sed -i -e '/^\[mysqld\]/,/^\[mysql/s/^max_allowed_packet.*/max_allowed_packet = 500M/' /etc/mysql/my.cnf |
| 64 cat /etc/mysql/my.cnf | 65 cat /etc/mysql/my.cnf |
| 65 sudo service mysql restart | 66 sudo service mysql restart |
| 66 sudo mysql -u root -e 'GRANT ALL ON rounduptest.* TO rounduptest@localhost IDENTIFIED BY "rounduptest";' | 67 sudo mysql -e 'GRANT ALL ON rounduptest.* TO rounduptest@localhost IDENTIFIED BY "rounduptest";' |
| 67 | 68 |
| 68 - name: Update pip | 69 - name: Update pip |
| 69 run: python -m pip install --upgrade pip | 70 run: python -m pip install --upgrade pip |
| 70 | 71 |
| 71 - name: Install db libraries | 72 - name: Install db libraries |
| 81 - name: Install aux packages that need versions differences | 82 - name: Install aux packages that need versions differences |
| 82 # if zstd fails install, keep going with test, don't abort | 83 # if zstd fails install, keep going with test, don't abort |
| 83 run: | | 84 run: | |
| 84 set -xv | 85 set -xv |
| 85 pip install zstd || true | 86 pip install zstd || true |
| 86 if [[ $(python -c 'import sys; print("%d.%d.%d"%(sys.version_info.major, sys.version_info.minor, sys.version_info.micro))') != "2."* ]]; then | 87 if [[ "$PYTHON_VERSION" != "2."* ]]; then |
| 87 pip install Markdown; fi | 88 pip install Markdown; fi |
| 88 | 89 |
| 89 - name: Install pytest and other packages needed for running tests | 90 - name: Install pytest and other packages needed for running tests |
| 90 run: pip install codecov flake8 pytest pytest-cov requests | 91 run: pip install codecov flake8 pytest pytest-cov requests |
| 91 | 92 |
| 105 flake8 roundup --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | 106 flake8 roundup --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics |
| 106 | 107 |
| 107 # Run the tests using pytest with test files in tests directory. | 108 # Run the tests using pytest with test files in tests directory. |
| 108 - name: Run tests | 109 - name: Run tests |
| 109 run: | | 110 run: | |
| 110 if [[ $(python -c 'import sys; print("%d.%d.%d"%(sys.version_info.major, sys.version_info.minor, sys.version_info.micro))') != "2."* ]]; then | 111 if [[ "$PYTHON_VERSION" != "2."* ]]; then |
| 111 pytest -r a \ | 112 pytest -r a \ |
| 112 -W default \ | 113 -W default \ |
| 113 -W "ignore:SelectableGroups:DeprecationWarning" \ | 114 -W "ignore:SelectableGroups:DeprecationWarning" \ |
| 114 -W "ignore:the imp module:DeprecationWarning:gpg.gpgme:15" \ | 115 -W "ignore:the imp module:DeprecationWarning:gpg.gpgme:15" \ |
| 115 -W "ignore:'U' mode::docutils.io" \ | 116 -W "ignore:'U' mode::docutils.io" \ |
