aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/lua_selectors/transforms.lua
Commit message (Expand)AuthorAgeFilesLines
* [Minor] Add selector transformer `filter_method`Vsevolod Stakhov2023-10-311-1/+22
* [Minor] Reformat all Lua code, no functional changesVsevolod Stakhov2023-08-071-53/+69
* [Fix] Rework lists applicationsVsevolod Stakhov2022-12-211-3/+2
* [Feature] Some rework of the selectors frameworkVsevolod Stakhov2022-12-101-0/+48
* [Minor] Add lower_utf8 selector transformationPavel Podkorytov2022-05-211-0/+11
* Revert "[Minor] fix lower transformation for utf symbols"Pavel Podkorytov2022-05-211-2/+1
* [Minor] fix lower transformation for utf symbolsPavel Podkorytov2022-05-201-1/+2
* [Minor] Update my email and the copyright yearVsevolod Stakhov2022-03-251-1/+1
* [Minor] Selectors: filter_string_nils utility transformationVsevolod Stakhov2020-11-131-0/+11
* [Minor] Selectors: Add extractor & transform for metatokensAndrew Lewis2020-11-111-0/+17
* [Minor] Fix `get_tld` selectorVsevolod Stakhov2020-09-171-1/+1
* [Minor] Selectors: Add `get_tld` transformVsevolod Stakhov2020-09-131-1/+13
* [Fix] Fix regexp selector and add flatteningVsevolod Stakhov2020-05-141-5/+13
* [Fix] Fix calling of methods in selectorsVsevolod Stakhov2020-05-141-2/+1
* [Fix] Unify selectors digest functionsVsevolod Stakhov2020-04-301-21/+4
* [Minor] Pet luacheckGregor Dschung2020-04-191-4/+7
* Merge pull request #3336 from rm-minus-rf/masterVsevolod Stakhov2020-04-181-1/+20
|\
| * [Minor] selectors: cleaner symbol extractorrm-minus-rf2020-04-181-4/+11
| * [Feature] add queueid, uid, messageid and specific symbols to selectorsrm-minus-rf2020-04-171-1/+13
* | [Minor] Selectors: Add ability to use base32 variantsVsevolod Stakhov2020-04-161-1/+5
|/
* [Minor] Selectors: Sigh, another try to fix .lastVsevolod Stakhov2019-12-111-7/+1
* [Minor] Selectors: Try to fix last transformationVsevolod Stakhov2019-12-111-1/+7
* [Minor] Selectors: Add except_map functionVsevolod Stakhov2019-08-191-0/+25
* [Rework] Reorganise selectors implementationVsevolod Stakhov2019-08-191-0/+395
prepare: # ubuntu used as base image for build and test images # and we need to download it anyway image: ubuntu:18.04 commands: - install -d -o nobody -g nogroup /rspamd/build /rspamd/install # lua-torch CMakeLists writes to src dir - chown nobody $CI_WORKSPACE/contrib/lua-torch/nn # for debug - echo $CI_COMMIT_AUTHOR build: # https://github.com/rspamd/rspamd-build-docker/blob/master/ubuntu-build/Dockerfile image: rspamd/ci-ubuntu-build group: build commands: # build directories should be writable by nobody, for rspamd in functional tests # works as nobody and writes coverage files there - test "$(id -un)" = nobody - cd /rspamd/build - cmake $CI_WORKSPACE -DENABLE_COVERAGE=ON -DENABLE_LIBUNWIND=ON -DCMAKE_INSTALL_PREFIX=/rspamd/install -DCMAKE_RULE_MESSAGES=OFF - ncpu=$(getconf _NPROCESSORS_ONLN) - make -j $ncpu install - make -j $ncpu rspamd-test eslint: image: node:10-alpine group: build commands: - npm install - ./node_modules/.bin/eslint -v - ./node_modules/.bin/eslint ./ # Run checks on perl source using tidyall perl-tidyall: # https://github.com/rspamd/rspamd-build-docker/blob/master/perl-tidyall/Dockerfile image: rspamd/ci-perl-tidyall group: build commands: # checks are configured in .tidyallrc at the top of rspamd repo - tidyall --all --check-only --no-cache --data-dir /tmp/tidyall # We run rspamd-test (unit test) and functional test (runned by robot) in # parallel to save time. To avoid conflict in saving lua coverage we run them # from different directories. For C code coverage counters is saved to .gcda # files and binary contain absolute path to them, so rspamd-test and # processes started by functional test are writing to the same files. On # process exit new coverage data merged with existing content of .gcda file. # Race is possible if rspamd-test and some rspamd process in functional test # will try to write .gcda file simultaneous. But it is very unlikely and # performance is more important then correct coverage data. rspamd-test: # https://github.com/rspamd/rspamd-build-docker/blob/master/ubuntu-test/Dockerfile image: rspamd/ci-ubuntu-test pull: true group: tests commands: - test "$(id -un)" = nobody - ulimit -c unlimited # rspamd-test and functional test both use luacov.stats.out file and should be started from # different directories (if started in parallel) - cd /rspamd/build/test - set +e - ./rspamd-test -p /rspamd/lua; EXIT_CODE=$? - set -e # shell sets exit status of a process terminated by a signal to '128 + signal-number' # if rspamd-test was terminated by a signal it should be SIGSEGV or SIGABRT, try to examine core - > if [ $EXIT_CODE -gt 128 ]; then gdb --batch -ex 'thread apply all bt full' -c /var/tmp/*.rspamd-test.core ./rspamd-test; exit $EXIT_CODE; fi # luacov-coveralls reads luacov.stats.out written by rspamd-test using luacov module # and writes json report for coveralls.io service - luacov-coveralls -o /rspamd/build/unit_test_lua.json --dryrun - exit $EXIT_CODE functional: # https://github.com/rspamd/rspamd-build-docker/blob/master/ubuntu-test-func/Dockerfile image: rspamd/ci-ubuntu-test-func pull: true group: tests commands: - cd /rspamd/build - ulimit -c unlimited # some rspamd processes during this test work as root and some as nobody # use umask to create world-writable files so nobody can write to *.gcda files created by root - umask 0000 - set +e - RSPAMD_INSTALLROOT=/rspamd/install robot --removekeywords wuks --exclude isbroken $CI_WORKSPACE/test/functional/cases; EXIT_CODE=$? - set -e # upload test results to nginx frontent using WebDAV PUT - > if [ -n "$HTTP_PUT_AUTH" ]; then $CI_WORKSPACE/test/tools/http_put.py log.html report.html $CI_SYSTEM_LINK/testlogs/$CI_REPO_NAME/$CI_BUILD_NUMBER/; fi # core_pattern=/var/tmp/%u.%e.core so one or two cores can be saved for each binary - core_files=$(find /var/tmp/ -name '*.core') # use 'info proc mappings' to find path to executable file for given core # first mapping is usually program executable - > for core in $core_files; do exe=$(gdb --batch -ex 'info proc mappings' -c $core | awk 'h {print $5; exit}; /objfile/ {h=1}'); gdb --batch -ex 'bt' -c $core $exe; echo '---'; done - exit $EXIT_CODE secrets: [http_put_auth] send-coverage: image: rspamd/ci-ubuntu-test secrets: [ coveralls_repo_token ] commands: - cd /rspamd/build # extract coverage data for C code from .gcda files and save it in a format suitable for coveralls.io - $CI_WORKSPACE/test/tools/gcov_coveralls.py --exclude test --prefix /rspamd/build --prefix $CI_WORKSPACE --out coverage.c.json # * merge coverage for C and Lua code # * remove prefixes from absolute paths (in luacov-coveralls files), filter test, contrib, e. t.c # * upload report to coveralls.io - $CI_WORKSPACE/test/tools/merge_coveralls.py --root $CI_WORKSPACE --input coverage.c.json unit_test_lua.json lua_coverage_report.json --token=$COVERALLS_REPO_TOKEN when: branch: master # don't send coverage report for pull request event: [push, tag] notify: image: drillster/drone-email from: noreply@rspamd.com secrets: [email_host, email_username, email_password] when: status: failure