Skip to content

Integration Tests for TLS #985

Integration Tests for TLS

Integration Tests for TLS #985

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-ci
cancel-in-progress: true
env:
VALKEY_HOSTNAME: database
REDIS_HOSTNAME: database
jobs:
unit-tests:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
matrix:
swift: ["swift:6.1", "swift:6.2"]
database: ["valkey/valkey:latest", "redis:latest"]
container:
image: ${{ matrix.swift }}
services:
database:
image: ${{ matrix.database }}
options: >-
--tls-port 6380
--tls-cert-file /valkey/certs/server.crt
--tls-key-file /valkey/certs/server.key
--tls-ca-cert-file /valkey/certs/ca.crt
ports:
- 6379:6379
- 6380:6380
volumes:
- ./valkey:/valkey
steps:
- name: Install jemalloc
run: |
apt-get update
apt-get install -y libjemalloc-dev
apt-get install curl
- name: Checkout
uses: actions/checkout@v4
- name: Generate certificates
run: ./dev/generate-test-certs.sh
- name: Restart Docker
uses: docker://docker
with:
args: docker restart database
- name: Test
run: |
swift test --enable-code-coverage
- name: Convert coverage files
run: |
llvm-cov export -format="lcov" \
.build/debug/valkey-swiftPackageTests.xctest \
-ignore-filename-regex="\/Tests\/" \
-instr-profile .build/debug/codecov/default.profdata > info.lcov
- name: Upload to codecov.io
uses: codecov/codecov-action@v4
with:
files: info.lcov
token: ${{ secrets.CODECOV_TOKEN }}