162 lines
4.6 KiB
YAML
162 lines
4.6 KiB
YAML
name: LetsEncrypt
|
|
on:
|
|
push:
|
|
branches:
|
|
- '*'
|
|
paths:
|
|
- '**.sh'
|
|
- '**.yml'
|
|
pull_request:
|
|
branches:
|
|
- dev
|
|
paths:
|
|
- '**.sh'
|
|
- '**.yml'
|
|
|
|
|
|
jobs:
|
|
Ubuntu:
|
|
strategy:
|
|
matrix:
|
|
TEST_ACME_Server: ["", "https://acme.zerossl.com/v2/DV90"]
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
TEST_LOCAL: 1
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Install tools
|
|
run: sudo apt-get install -y socat
|
|
- name: Clone acmetest
|
|
run: |
|
|
cd .. \
|
|
&& git clone https://github.com/acmesh-official/acmetest.git \
|
|
&& cp -r acme.sh acmetest/
|
|
- name: Run acmetest
|
|
run: |
|
|
cd ../acmetest \
|
|
&& export ACME_DIRECTORY=${{ matrix.TEST_ACME_Server }} \
|
|
&& sudo --preserve-env ./letest.sh
|
|
|
|
MacOS:
|
|
strategy:
|
|
matrix:
|
|
TEST_ACME_Server: ["", "https://acme.zerossl.com/v2/DV90"]
|
|
runs-on: macos-latest
|
|
env:
|
|
TEST_LOCAL: 1
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Install tools
|
|
run: brew install socat
|
|
- name: Clone acmetest
|
|
run: |
|
|
cd .. \
|
|
&& git clone https://github.com/acmesh-official/acmetest.git \
|
|
&& cp -r acme.sh acmetest/
|
|
- name: Run acmetest
|
|
run: |
|
|
cd ../acmetest \
|
|
&& export ACME_DIRECTORY=${{ matrix.TEST_ACME_Server }} \
|
|
&& sudo --preserve-env ./letest.sh
|
|
|
|
Windows:
|
|
strategy:
|
|
matrix:
|
|
TEST_ACME_Server: ["", "https://acme.zerossl.com/v2/DV90"]
|
|
runs-on: windows-latest
|
|
env:
|
|
TEST_LOCAL: 1
|
|
#The 80 port is used by Windows server, we have to use a custom port, tunnel will also use this port.
|
|
Le_HTTPPort: 8888
|
|
steps:
|
|
- name: Set git to use LF
|
|
run: |
|
|
git config --global core.autocrlf false
|
|
- uses: actions/checkout@v2
|
|
- name: Install cygwin base packages with chocolatey
|
|
run: |
|
|
choco config get cacheLocation
|
|
choco install --no-progress cygwin
|
|
shell: cmd
|
|
- name: Install cygwin additional packages
|
|
run: |
|
|
C:\tools\cygwin\cygwinsetup.exe -qgnNdO -R C:/tools/cygwin -s http://mirrors.kernel.org/sourceware/cygwin/ -P socat,curl,cron,unzip,git
|
|
shell: cmd
|
|
- name: Set ENV
|
|
shell: cmd
|
|
run: |
|
|
echo PATH=C:\tools\cygwin\bin;C:\tools\cygwin\usr\bin >> %GITHUB_ENV%
|
|
- name: Check ENV
|
|
shell: cmd
|
|
run: |
|
|
echo "PATH=%PATH%"
|
|
- name: Clone acmetest
|
|
shell: cmd
|
|
run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
|
|
- name: Run acmetest
|
|
shell: cmd
|
|
run: |
|
|
cd ../acmetest \
|
|
&& set ACME_DIRECTORY=${{ matrix.TEST_ACME_Server }} \
|
|
&& bash.exe -c ./letest.sh
|
|
|
|
FreeBSD:
|
|
strategy:
|
|
matrix:
|
|
TEST_ACME_Server: ["", "https://acme.zerossl.com/v2/DV90"]
|
|
runs-on: macos-latest
|
|
env:
|
|
TEST_LOCAL: 1
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: vmactions/cf-tunnel@v0.0.2
|
|
id: tunnel
|
|
with:
|
|
protocol: http
|
|
port: 8080
|
|
- name: Set envs
|
|
run: echo "TestingDomain=${{steps.tunnel.outputs.server}}" >> $GITHUB_ENV
|
|
- name: Clone acmetest
|
|
run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
|
|
- uses: vmactions/freebsd-vm@v0.1.4
|
|
with:
|
|
envs: 'TEST_LOCAL TestingDomain'
|
|
nat: |
|
|
"8080": "80"
|
|
prepare: pkg install -y socat curl
|
|
usesh: true
|
|
run: |
|
|
cd ../acmetest \
|
|
&& export ACME_DIRECTORY=${{ matrix.TEST_ACME_Server }} \
|
|
&& ./letest.sh
|
|
|
|
Solaris:
|
|
strategy:
|
|
matrix:
|
|
TEST_ACME_Server: ["", "https://acme.zerossl.com/v2/DV90"]
|
|
runs-on: macos-latest
|
|
env:
|
|
TEST_LOCAL: 1
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: vmactions/cf-tunnel@v0.0.2
|
|
id: tunnel
|
|
with:
|
|
protocol: http
|
|
port: 8080
|
|
- name: Set envs
|
|
run: echo "TestingDomain=${{steps.tunnel.outputs.server}}" >> $GITHUB_ENV
|
|
- name: Clone acmetest
|
|
run: cd .. && git clone https://github.com/acmesh-official/acmetest.git && cp -r acme.sh acmetest/
|
|
- uses: vmactions/solaris-vm@v0.0.3
|
|
with:
|
|
envs: 'TEST_LOCAL TestingDomain'
|
|
nat: |
|
|
"8080": "80"
|
|
prepare: pkgutil -y -i socat curl
|
|
run: |
|
|
cd ../acmetest \
|
|
&& export ACME_DIRECTORY=${{ matrix.TEST_ACME_Server }} \
|
|
&& ./letest.sh
|
|
|