3434 runs-on : ubuntu-latest
3535 needs :
3636 - python
37+ - cassandra
3738 - elasticsearchserver07
3839 - elasticsearchserver08
3940 - firestore
@@ -74,29 +75,29 @@ jobs:
7475
7576 - name : Run Trivy vulnerability scanner in repo mode
7677 if : ${{ github.event_name == 'pull_request' }}
77- uses : aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # v0.29.0
78+ uses : aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # v0.29.0
7879 with :
79- scan-type : ' fs '
80+ scan-type : " fs "
8081 ignore-unfixed : true
8182 format : table
8283 exit-code : 1
83- severity : ' CRITICAL,HIGH,MEDIUM,LOW'
84+ severity : " CRITICAL,HIGH,MEDIUM,LOW"
8485
8586 - name : Run Trivy vulnerability scanner in repo mode
8687 if : ${{ github.event_name == 'schedule' }}
87- uses : aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # v0.29.0
88+ uses : aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # v0.29.0
8889 with :
89- scan-type : ' fs '
90+ scan-type : " fs "
9091 ignore-unfixed : true
91- format : ' sarif'
92- output : ' trivy-results.sarif'
93- severity : ' CRITICAL,HIGH,MEDIUM,LOW'
92+ format : " sarif"
93+ output : " trivy-results.sarif"
94+ severity : " CRITICAL,HIGH,MEDIUM,LOW"
9495
9596 - name : Upload Trivy scan results to GitHub Security tab
9697 if : ${{ github.event_name == 'schedule' }}
9798 uses : github/codeql-action/upload-sarif@v3
9899 with :
99- sarif_file : ' trivy-results.sarif'
100+ sarif_file : " trivy-results.sarif"
100101
101102 # Combine and upload coverage data
102103 coverage :
@@ -274,7 +275,7 @@ jobs:
274275 - 8080:8080
275276 - 8081:8081
276277 - 8082:8082
277- # Set health checks to wait until nginx has started
278+ # Set health checks to wait until container has started
278279 options : >-
279280 --health-cmd "service nginx status || exit 1"
280281 --health-interval 10s
@@ -338,7 +339,7 @@ jobs:
338339 ports :
339340 - 8080:5432
340341 - 8081:5432
341- # Set health checks to wait until postgres has started
342+ # Set health checks to wait until container has started
342343 options : >-
343344 --health-cmd pg_isready
344345 --health-interval 10s
@@ -402,7 +403,7 @@ jobs:
402403 ports :
403404 - 8080:5432
404405 - 8081:5432
405- # Set health checks to wait until postgres has started
406+ # Set health checks to wait until container has started
406407 options : >-
407408 --health-cmd pg_isready
408409 --health-interval 10s
@@ -469,7 +470,7 @@ jobs:
469470 ports :
470471 - 8080:1433
471472 - 8081:1433
472- # Set health checks to wait until mysql has started
473+ # Set health checks to wait until container has started
473474 options : >-
474475 --health-cmd "/opt/mssql-tools/bin/sqlcmd -U SA -P $MSSQL_SA_PASSWORD -Q 'SELECT 1'"
475476 --health-interval 10s
@@ -536,7 +537,7 @@ jobs:
536537 ports :
537538 - 8080:3306
538539 - 8081:3306
539- # Set health checks to wait until mysql has started
540+ # Set health checks to wait until container has started
540541 options : >-
541542 --health-cmd "mysqladmin ping -h localhost"
542543 --health-interval 10s
@@ -701,7 +702,7 @@ jobs:
701702 ports :
702703 - 8080:6379
703704 - 8081:6379
704- # Set health checks to wait until redis has started
705+ # Set health checks to wait until container has started
705706 options : >-
706707 --health-cmd "redis-cli ping"
707708 --health-interval 10s
@@ -765,7 +766,7 @@ jobs:
765766 ports :
766767 - 8080:8983
767768 - 8081:8983
768- # Set health checks to wait until solr has started
769+ # Set health checks to wait until container has started
769770 options : >-
770771 --health-cmd "curl localhost:8983/solr/collection/admin/ping | grep OK"
771772 --health-interval 10s
@@ -827,7 +828,7 @@ jobs:
827828 ports :
828829 - 8080:11211
829830 - 8081:11211
830- # Set health checks to wait until memcached has started
831+ # Set health checks to wait until container has started
831832 options : >-
832833 --health-cmd "timeout 5 bash -c 'cat < /dev/null > /dev/udp/127.0.0.1/11211'"
833834 --health-interval 10s
@@ -890,7 +891,7 @@ jobs:
890891 RABBITMQ_PASSWORD : rabbitmq
891892 ports :
892893 - 5672:5672
893- # Set health checks to wait until rabbitmq has started
894+ # Set health checks to wait until container has started
894895 options : >-
895896 --health-cmd "rabbitmq-diagnostics status"
896897 --health-interval 10s
@@ -1026,7 +1027,7 @@ jobs:
10261027 ports :
10271028 - 8080:27017
10281029 - 8081:27017
1029- # Set health checks to wait until mongodb has started
1030+ # Set health checks to wait until container has started
10301031 options : >-
10311032 --health-cmd "echo 'db.runCommand(\"ping\").ok' | mongo localhost:27017/test --quiet || exit 1"
10321033 --health-interval 10s
@@ -1088,7 +1089,7 @@ jobs:
10881089 ports :
10891090 - 8080:27017
10901091 - 8081:27017
1091- # Set health checks to wait until mongodb has started
1092+ # Set health checks to wait until container has started
10921093 options : >-
10931094 --health-cmd "echo 'db.runCommand(\"ping\").ok' | mongosh localhost:27017/test --quiet || exit 1"
10941095 --health-interval 10s
@@ -1129,6 +1130,73 @@ jobs:
11291130 path : ./**/.coverage.*
11301131 retention-days : 1
11311132
1133+ cassandra :
1134+ env :
1135+ TOTAL_GROUPS : 1
1136+
1137+ strategy :
1138+ fail-fast : false
1139+ matrix :
1140+ group-number : [1]
1141+
1142+ runs-on : ubuntu-latest
1143+ container :
1144+ image : ghcr.io/newrelic/newrelic-python-agent-ci:latest
1145+ options : >-
1146+ --add-host=host.docker.internal:host-gateway
1147+ timeout-minutes : 30
1148+ services :
1149+ cassandra :
1150+ image : cassandra:5.0.2
1151+ env :
1152+ CASSANDRA_SEEDS : " cassandra"
1153+ CASSANDRA_CLUSTER_NAME : TestCluster
1154+ CASSANDRA_ENDPOINT_SNITCH : SimpleSnitch
1155+ CASSANDRA_NUM_TOKENS : " 128"
1156+ ports :
1157+ - 8080:9042
1158+ - 8081:9042
1159+ # Set health checks to wait until container has started
1160+ options : >-
1161+ --health-cmd "cqlsh localhost 9042 -e 'describe cluster'"
1162+ --health-interval 30s
1163+ --health-timeout 5s
1164+ --health-retries 10
1165+
1166+ steps :
1167+ - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # 4.1.1
1168+
1169+ - name : Fetch git tags
1170+ run : |
1171+ git config --global --add safe.directory "$GITHUB_WORKSPACE"
1172+ git fetch --tags origin
1173+
1174+ - name : Configure pip cache
1175+ run : |
1176+ mkdir -p /github/home/.cache/pip
1177+ chown -R $(whoami) /github/home/.cache/pip
1178+
1179+ - name : Get Environments
1180+ id : get-envs
1181+ run : |
1182+ echo "envs=$(tox -l | grep '^${{ github.job }}\-' | ./.github/workflows/get-envs.py)" >> $GITHUB_OUTPUT
1183+ env :
1184+ GROUP_NUMBER : ${{ matrix.group-number }}
1185+
1186+ - name : Test
1187+ run : |
1188+ tox -vv -e ${{ steps.get-envs.outputs.envs }} -p auto
1189+ env :
1190+ TOX_PARALLEL_NO_SPINNER : 1
1191+ PY_COLORS : 0
1192+
1193+ - name : Upload Coverage Artifacts
1194+ uses : actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # 4.3.1
1195+ with :
1196+ name : coverage-${{ github.job }}-${{ strategy.job-index }}
1197+ path : ./**/.coverage.*
1198+ retention-days : 1
1199+
11321200 elasticsearchserver07 :
11331201 env :
11341202 TOTAL_GROUPS : 1
@@ -1152,7 +1220,7 @@ jobs:
11521220 ports :
11531221 - 8080:9200
11541222 - 8081:9200
1155- # Set health checks to wait until elasticsearch has started
1223+ # Set health checks to wait until container has started
11561224 options : >-
11571225 --health-cmd "curl --silent --fail localhost:9200/_cluster/health || exit 1"
11581226 --health-interval 10s
@@ -1217,7 +1285,7 @@ jobs:
12171285 ports :
12181286 - 8080:9200
12191287 - 8081:9200
1220- # Set health checks to wait until elasticsearch has started
1288+ # Set health checks to wait until container has started
12211289 options : >-
12221290 --health-cmd "curl --silent --fail localhost:9200/_cluster/health || exit 1"
12231291 --health-interval 10s
@@ -1279,7 +1347,7 @@ jobs:
12791347 image : gcr.io/google.com/cloudsdktool/google-cloud-cli:437.0.1-emulators
12801348 ports :
12811349 - 8080:8080
1282- # Set health checks to wait 5 seconds in lieu of an actual healthcheck
1350+ # Set health checks to wait until container has started
12831351 options : >-
12841352 --health-cmd "echo success"
12851353 --health-interval 10s
@@ -1348,7 +1416,7 @@ jobs:
13481416 ports :
13491417 - 8080:6379
13501418 - 8081:6379
1351- # Set health checks to wait until valkey has started
1419+ # Set health checks to wait until container has started
13521420 options : >-
13531421 --health-cmd "valkey-cli ping"
13541422 --health-interval 10s
0 commit comments