Skip to content

Commit

Permalink
Make syntax more simple
Browse files Browse the repository at this point in the history
  • Loading branch information
airween committed Apr 16, 2024
1 parent dc6a525 commit d285913
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ on:
push:
pull_request:

# Default: none
permissions: {}

jobs:
permissions:
contents: read
build-linux:
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -13,7 +18,7 @@ jobs:
compiler: [gcc, clang]
env:
CC: "/usr/bin/${{ matrix.compiler }}"
CXX: "${{ matrix.compiler == 'gcc' && '/usr/bin/g++' || '/usr/bin/clang++' }}"
CXX: "/usr/bin/${{ matrix.compiler == 'gcc' && 'g' || 'clang' }}++"
COMPDEPS: "${{ matrix.compiler == 'gcc' && 'gcc g++' || 'clang' }}"
steps:
- name: Setup Dependencies
Expand All @@ -30,7 +35,6 @@ jobs:
./configure --without-lmdb --prefix=/usr
make -j $(nproc)
sudo make install
cd
- uses: actions/checkout@v4
with:
path: ModSecurity-nginx
Expand All @@ -44,13 +48,13 @@ jobs:
- name: Build nginx with ModSecurity-nginx module
working-directory: nginx
run: |
./auto/configure --with-ld-opt="-Wl,-rpath,/usr/local/lib" --without-pcre2 --add-module=/home/runner/work/ModSecurity-nginx/ModSecurity-nginx/ModSecurity-nginx
./auto/configure --with-ld-opt="-Wl,-rpath,/usr/local/lib" --without-pcre2 --add-module=ModSecurity-nginx/ModSecurity-nginx/ModSecurity-nginx
make
make modules
sudo make install
- name: Start Nginx
run: |
sudo /usr/local/nginx/sbin/nginx -c /home/runner/work/ModSecurity-nginx/ModSecurity-nginx/ModSecurity-nginx/.github/nginx/nginx.conf
sudo /usr/local/nginx/sbin/nginx -c ModSecurity-nginx/ModSecurity-nginx/ModSecurity-nginx/.github/nginx/nginx.conf
- name: Run attack test vhost 1
run: |
status=$(curl -sSo /dev/null -w %{http_code} -I -X GET -H "Host: modsectest1" "http://localhost/?q=attack")
Expand Down

0 comments on commit d285913

Please sign in to comment.