Skip to content

Commit cc2e7d2

Browse files
authored
Fix mssql docker tests v2 (#723)
* Pin ubuntu to 20.04 in CI * Fix mssql docker tests
1 parent 7f00fb8 commit cc2e7d2

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

.github/workflows/test.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
matrix:
2525
python-version: [ py36, py37, py38, py39, pypy3 ]
2626
package: ["instrumentation", "exporter", "sdkextension", "propagator"]
27-
os: [ ubuntu-latest ]
27+
os: [ ubuntu-20.04 ]
2828
steps:
2929
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }}
3030
uses: actions/checkout@v2
@@ -74,7 +74,7 @@ jobs:
7474
matrix:
7575
tox-environment: [ "docker-tests", "lint", "docs", "generate" ]
7676
name: ${{ matrix.tox-environment }}
77-
runs-on: ubuntu-latest
77+
runs-on: ubuntu-20.04
7878
steps:
7979
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }}
8080
uses: actions/checkout@v2
@@ -84,6 +84,13 @@ jobs:
8484
python-version: 3.9
8585
- name: Install tox
8686
run: pip install -U tox
87+
- name: Prep mssql driver
88+
if: ${{ matrix.tox-environment == 'docker-tests' }}
89+
run: |
90+
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
91+
sudo sh -c "echo 'deb [arch=amd64,armhf,arm64] https://packages.microsoft.com/ubuntu/20.04/prod focal main' > /etc/apt/sources.list.d/mssql-release.list"
92+
sudo apt-get update
93+
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql17
8794
- name: Install libsnappy-dev
8895
if: ${{ matrix.tox-environment == 'lint' }}
8996
run: sudo apt-get install -y libsnappy-dev

tests/opentelemetry-docker-tests/tests/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ services:
4040
- "14268:14268"
4141
- "9411:9411"
4242
otmssql:
43-
image: mcr.microsoft.com/mssql/server:2017-latest
43+
image: mcr.microsoft.com/mssql/server:2017-CU23-ubuntu-16.04
4444
ports:
4545
- "1433:1433"
4646
environment:
4747
ACCEPT_EULA: "Y"
4848
SA_PASSWORD: "yourStrong(!)Password"
49-
command: /bin/sh -c "sleep 10s && /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P yourStrong\(!\)Password -d master -Q 'CREATE DATABASE [opentelemetry-tests]' & /opt/mssql/bin/sqlservr"
49+
command: /bin/sh -c "sleep 10s && /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P yourStrong\(!\)Password -d master -Q 'CREATE DATABASE [opentelemetry-tests]' & /opt/mssql/bin/sqlservr"

0 commit comments

Comments
 (0)