diff --git a/.github/workflows/unittests-mysql.yaml b/.github/workflows/unittests-mysql.yaml new file mode 100644 index 00000000..b90e728c --- /dev/null +++ b/.github/workflows/unittests-mysql.yaml @@ -0,0 +1,30 @@ +name: Bitcoinlib Tests Ubuntu - MySQL +on: [push] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + architecture: 'x64' + - name: Set up MySQL + env: + DB_DATABASE: bitcoinlib_test + DB_USER: user + DB_PASSWORD: password + run: | + sudo /etc/init.d/mysql start + mysql -e 'CREATE DATABASE ${{ env.DB_DATABASE }};' -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} + - name: Install dependencies + run: | + python -m pip install .[dev] + - name: Test with coverage + env: + BCL_CONFIG_FILE: config.ini.unittest + UNITTEST_DATABASE: postgresql + run: coverage run --source=bitcoinlib -m unittest -v