Skip to content

Add "tls' feature workflow and basic test #2

Add "tls' feature workflow and basic test

Add "tls' feature workflow and basic test #2

Workflow file for this run

# This workflow will make use of Faktory put behind NGINX to test
# the crate's tls feature (see docker dir in the project's root)
permissions:
contents: read
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
name: tls
jobs:
test:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} / ${{ matrix.toolchain }} / tls
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
# run on stable and beta to ensure that tests won't break on the next version
# of the rust toolchain
toolchain: [stable, beta]
steps:
- uses: actions/checkout@v4
with:
submodules: true
# Unlike 'ubuntu' and 'windows', 'macos' runner image will not have `docker` and `compose` pre-installed,
# see: https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md#tools.
# Installing `Colima` (https://github.com/abiosoft/colima) as advised in the issue discussion:
# https://github.com/actions/runner-images/issues/17#issuecomment-1537238473
- name: Setup docker on macos-latest
if: runner.os == 'macos-latest'
run: |
brew install colima
colima start
sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock
- name: Launch Faktory behind NGINX
run: docker compose -f docker/compose.yml up -d
- name: Install ${{ matrix.toolchain }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- name: cargo generate-lockfile
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile
- name: Run tests
env:
FAKTORY_URL: tcp://127.0.0.1:7419
FAKTORY_URL_SECURE: tcp://localhost:17419
run: cargo test --locked --features tls --all-targets