comparison .github/workflows/ci-test.yml @ 6840:8ee17804086e

untabify yml file.
author John Rouillard <rouilj@ieee.org>
date Wed, 31 Aug 2022 17:40:31 -0400
parents 6e1a82c3addb
children 3671c0f6352e
comparison
equal deleted inserted replaced
6839:6e1a82c3addb 6840:8ee17804086e
56 psql -c "CREATE ROLE rounduptest WITH CREATEDB LOGIN PASSWORD 'rounduptest';" -U postgres 56 psql -c "CREATE ROLE rounduptest WITH CREATEDB LOGIN PASSWORD 'rounduptest';" -U postgres
57 57
58 - name: Install mysql 58 - name: Install mysql
59 run: | 59 run: |
60 apt-get install mysql 60 apt-get install mysql
61 # set up mysql database 61 # set up mysql database
62 sudo sed -i -e '/^\[mysqld\]/,/^\[mysql/s/^max_allowed_packet.*/max_allowed_packet = 500M/' /etc/mysql/my.cnf 62 sudo sed -i -e '/^\[mysqld\]/,/^\[mysql/s/^max_allowed_packet.*/max_allowed_packet = 500M/' /etc/mysql/my.cnf
63 cat /etc/mysql/my.cnf 63 cat /etc/mysql/my.cnf
64 sudo service mysql restart 64 sudo service mysql restart
65 mysql -u root -e 'GRANT ALL ON rounduptest.* TO rounduptest@localhost IDENTIFIED BY "rounduptest";' 65 mysql -u root -e 'GRANT ALL ON rounduptest.* TO rounduptest@localhost IDENTIFIED BY "rounduptest";'
66 # HACK: workaround mysql bug: http://bugs.mysql.com/bug.php?id=74901 66 # HACK: workaround mysql bug: http://bugs.mysql.com/bug.php?id=74901
67 # needed for test_mysql.mysqlDBTest.testFilteringSpecialChars 67 # needed for test_mysql.mysqlDBTest.testFilteringSpecialChars
68 # plus others. Otherwise we get: 68 # plus others. Otherwise we get:
69 # COLLATION 'utf8_bin' is not valid for CHARACTER SET 'utf8mb4' 69 # COLLATION 'utf8_bin' is not valid for CHARACTER SET 'utf8mb4'
70 sed -i 's/CREATE DATABASE \%s/CREATE DATABASE \%s COLLATE utf8_general_ci/' roundup/backends/back_mysql.py 70 sed -i 's/CREATE DATABASE \%s/CREATE DATABASE \%s COLLATE utf8_general_ci/' roundup/backends/back_mysql.py
71 71
72 - name: Update pip 72 - name: Update pip
73 run: python -m pip install --upgrade pip 73 run: python -m pip install --upgrade pip
74 74
75 - name: Install db libraries 75 - name: Install db libraries
81 pyjwt pytz whoosh 81 pyjwt pytz whoosh
82 82
83 - name: Install aux packages that need versions differences 83 - name: Install aux packages that need versions differences
84 # if zstd fails install, keep going with test, don't abort 84 # if zstd fails install, keep going with test, don't abort
85 run: | 85 run: |
86 pip install zstd || true 86 pip install zstd || true
87 if "$${{ PYTHON_VERSION }} != "2."* ]]; then 87 if "$${{ PYTHON_VERSION }} != "2."* ]]; then
88 pip install Markdown; fi 88 pip install Markdown; fi
89 89
90 - name: Install pytest and other packages needed for running tests 90 - name: Install pytest and other packages needed for running tests
91 run: pip install codecov flake8 pytest pytest-cov requests 91 run: pip install codecov flake8 pytest pytest-cov requests
92 92
93 - name: Test build roundup and install locale so lang tests work. 93 - name: Test build roundup and install locale so lang tests work.
94 run: | 94 run: |
95 ${{ matrix.python-version }} setup.py install 95 ${{ matrix.python-version }} setup.py install
96 (cd locale; make local_install; ls -lR locale/de/LC_MESSAGES) 96 (cd locale; make local_install; ls -lR locale/de/LC_MESSAGES)
97 97
98 - name: run flake8 in warn only mode 98 - name: run flake8 in warn only mode
99 run: | 99 run: |
100 # stop the build for Python syntax errors or undefined names 100 # stop the build for Python syntax errors or undefined names
101 flake8 roundup --count --select=E9,F63,F7,F82 --show-source --statistics 101 flake8 roundup --count --select=E9,F63,F7,F82 --show-source --statistics
102 # exit-zero treats all errors as warnings. 102 # exit-zero treats all errors as warnings.
103 # The GitHub editor is 127 chars wide 103 # The GitHub editor is 127 chars wide
104 flake8 roundup --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics 104 flake8 roundup --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
105 105
106 # Run the tests using pytest with test files in tests directory. 106 # Run the tests using pytest with test files in tests directory.
107 - name: Run tests 107 - name: Run tests
108 run: pytest -v tests 108 run: pytest -v tests
109 109
110 - name: Upload coverage to Codecov 110 - name: Upload coverage to Codecov
111 # see: https://github.com/codecov/codecov-action#usage 111 # see: https://github.com/codecov/codecov-action#usage
112 uses: codecov/codecov-action@v3 112 uses: codecov/codecov-action@v3
113 with: 113 with:
114 verbose: true 114 verbose: true
115 115
116 - name: test build_doc 116 - name: test build_doc
117 run: | 117 run: |

Roundup Issue Tracker: http://roundup-tracker.org/