0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 04:10:24 +00:00
cowboy/.github/workflows/ci.yaml
Loïc Hoguin 8cb9d242b0
Initial HTTP/3 implementation
This includes Websocket over HTTP/3.

Since quicer, which provides the QUIC implementation,
is a NIF, Cowboy cannot depend directly on it. In order
to enable QUIC and HTTP/3, users have to set the
COWBOY_QUICER environment variable:

  export COWBOY_QUICER=1

In order to run the test suites, the same must be done
for Gun:

  export GUN_QUICER=1

HTTP/3 support is currently not available on Windows
due to compilation issues of quicer which have yet to
be looked at or resolved.

HTTP/3 support is also unavailable on the upcoming
OTP-27 due to compilation errors in quicer dependencies.
Once resolved HTTP/3 should work on OTP-27.

Because of how QUIC currently works, it's possible
that streams that get reset after sending a response
do not receive that response. The test suite was
modified to accomodate for that. A future extension
to QUIC will allow us to gracefully reset streams.

This also updates Erlang.mk.
2024-03-26 15:53:48 +01:00

70 lines
1.8 KiB
YAML

## Use workflows from ninenines/ci.erlang.mk to test Cowboy.
name: Check Cowboy
on:
push:
branches:
- master
pull_request:
schedule:
## Every Monday at 2am.
- cron: 0 2 * * 1
env:
CI_ERLANG_MK: 1
jobs:
cleanup-master:
name: Cleanup master build
runs-on: ubuntu-latest
steps:
- name: Cleanup master build if necessary
if: ${{ github.event_name == 'schedule' }}
run: |
gh extension install actions/gh-actions-cache
gh actions-cache delete Linux-X64-Erlang-master -R $REPO --confirm || true
gh actions-cache delete macOS-X64-Erlang-master -R $REPO --confirm || true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
check:
name: Cowboy
needs: cleanup-master
uses: ninenines/ci.erlang.mk/.github/workflows/ci.yaml@master
# The examples test suite is nice to run but typically not
# important. So we run them after we are done with the other
# test suites. At this point we know that Erlang was built
# so we can just use the latest version.
examples:
name: Check examples
needs: check
runs-on: 'ubuntu-latest'
if: ${{ !cancelled() }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Output latest Erlang/OTP version
id: latest_version
run: |
{
echo "latest<<EOF"
make ci-list | grep -v rc | grep -v master | tail -n1
echo EOF
} >> "$GITHUB_OUTPUT"
- name: Restore CI cache
uses: actions/cache/restore@v4
with:
path: |
~/erlang/
key: ${{ runner.os }}-${{ runner.arch }}-Erlang-${{ steps.latest_version.outputs.latest }}
- name: Run ct-examples
run: make ct-examples LATEST_ERLANG_OTP=1