Skip to content

Commit

Permalink
Merge pull request #129 from Webperf-se/issue-102-email
Browse files Browse the repository at this point in the history
Issue 102 email
  • Loading branch information
7h3Rabbit authored Dec 9, 2022
2 parents 5712735 + 634b208 commit c9fea87
Show file tree
Hide file tree
Showing 27 changed files with 1,017 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/regression-test-404.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v3
if: ${{ success() }}
- name: Setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/regression-test-css.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v3
if: ${{ success() }}
- name: Setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/regression-test-email.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "Regression Test - Email (Beta) Test"
on:
push:
paths-ignore:
- '**.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
if: ${{ success() }}
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- name: Setup dependencies using pip
run: pip install -r requirements.txt
if: ${{ success() }}
- name: Test Tracking and Privacy - USE DOCKER
run: |
python .github/workflows/verify_result.py -c true
python default.py -t 24 -r -u https://kodagent.se/ -o .github/workflows/testresult-24.json
python .github/workflows/verify_result.py -t 24
if: ${{ always() }}
- name: Test Tracking and Privacy - USE NPM PACKAGE
run: |
python .github/workflows/verify_result.py -c false
python default.py -t 24 -r -u https://feber.se/ -o .github/workflows/testresult-24.json
python .github/workflows/verify_result.py -t 24
if: ${{ always() }}
6 changes: 3 additions & 3 deletions .github/workflows/regression-test-google-lighthouse-based.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v3
if: ${{ success() }}
- name: Setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- name: Setup dependencies using pip
run: pip install -r requirements.txt
if: ${{ success() }}
- name: Setup node (ONLY used for Yellow Lab Tools AND lighthouse)
uses: actions/setup-node@v2
uses: actions/setup-node@v3
- name: Setup lighthouse npm package (ONLY used for lighthouse)
run: npm install -g lighthouse
if: ${{ success() }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/regression-test-html.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v3
if: ${{ success() }}
- name: Setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/regression-test-http.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v3
if: ${{ success() }}
- name: Setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/regression-test-pa11y.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v3
if: ${{ success() }}
- name: Setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- name: Setup dependencies using pip
run: pip install -r requirements.txt
if: ${{ success() }}
- name: Setup node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
- name: Setup Pa11y CI npm package
run: npm install -g pa11y-ci
- name: Setup config (using SAMPLE-config.py as config.py)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/regression-test-sitespeed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v3
if: ${{ success() }}
- name: Setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/regression-test-standard-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v3
if: ${{ success() }}
- name: Setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/regression-test-tracking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v3
if: ${{ success() }}
- name: Setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
python .github/workflows/verify_result.py -t 23
if: ${{ success() }}
- name: Setup Node.js (v1 version 14.x)
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: '14.x'
if: ${{ success() }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/regression-test-translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v3
if: ${{ success() }}
- name: Setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/regression-test-webbkoll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v3
if: ${{ success() }}
- name: Setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/regression-test-ylt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v3
if: ${{ success() }}
- name: Setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- name: Setup dependencies using pip
run: pip install -r requirements.txt
if: ${{ success() }}
- name: Setup node (ONLY used for Yellow Lab Tools)
uses: actions/setup-node@v2
uses: actions/setup-node@v3
- name: Setup node dependencies (ONLY used for Yellow Lab Tools)
run: npm install -g node-gyp
- name: Setup libjpeg and fontconfig (ONLY used for Yellow Lab Tools)
Expand Down
3 changes: 2 additions & 1 deletion default.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


def validate_test_type(test_type):
if test_type != utils.TEST_HTML and test_type != utils.TEST_PAGE_NOT_FOUND and test_type != utils.TEST_CSS and test_type != utils.TEST_WEBBKOLL and test_type != utils.TEST_GOOGLE_LIGHTHOUSE and test_type != utils.TEST_GOOGLE_LIGHTHOUSE_PWA and test_type != utils.TEST_GOOGLE_LIGHTHOUSE_A11Y and test_type != utils.TEST_GOOGLE_LIGHTHOUSE_SEO and test_type != utils.TEST_GOOGLE_LIGHTHOUSE_BEST_PRACTICE and test_type != utils.TEST_STANDARD_FILES and test_type != utils.TEST_YELLOW_LAB_TOOLS and test_type != utils.TEST_PA11Y and test_type != utils.TEST_HTTP and test_type != utils.TEST_ENERGY_EFFICIENCY and test_type != utils.TEST_TRACKING and test_type != utils.TEST_SITESPEED:
if test_type != utils.TEST_HTML and test_type != utils.TEST_PAGE_NOT_FOUND and test_type != utils.TEST_CSS and test_type != utils.TEST_WEBBKOLL and test_type != utils.TEST_GOOGLE_LIGHTHOUSE and test_type != utils.TEST_GOOGLE_LIGHTHOUSE_PWA and test_type != utils.TEST_GOOGLE_LIGHTHOUSE_A11Y and test_type != utils.TEST_GOOGLE_LIGHTHOUSE_SEO and test_type != utils.TEST_GOOGLE_LIGHTHOUSE_BEST_PRACTICE and test_type != utils.TEST_STANDARD_FILES and test_type != utils.TEST_YELLOW_LAB_TOOLS and test_type != utils.TEST_PA11Y and test_type != utils.TEST_HTTP and test_type != utils.TEST_ENERGY_EFFICIENCY and test_type != utils.TEST_TRACKING and test_type != utils.TEST_SITESPEED and test_type != utils.TEST_EMAIL:
print(_('TEXT_TEST_VALID_ARGUMENTS'))
print(_('TEXT_TEST_VALID_ARGUMENTS_GOOGLE_LIGHTHOUSE'))
print(_('TEXT_TEST_VALID_ARGUMENTS_PAGE_NOT_FOUND'))
Expand All @@ -27,6 +27,7 @@ def validate_test_type(test_type):
print(_('TEXT_TEST_VALID_ARGUMENTS_HTTP'))
print(_('TEXT_TEST_VALID_ARGUMENTS_ENERGY_EFFICIENCY'))
print(_('TEXT_TEST_VALID_ARGUMENTS_TRACKING'))
print(_('TEXT_TEST_VALID_ARGUMENTS_EMAIL'))
return -2
else:
return test_type
Expand Down
Binary file added locales/en/LC_MESSAGES/email_validator.mo
Binary file not shown.
130 changes: 130 additions & 0 deletions locales/en/LC_MESSAGES/email_validator.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# English (default).
# Copyright (C) 2022 WebPerf
# FIRST AUTHOR <mattias@webperf.se>, 2022.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2022-12-09 17:04+0200\n"
"PO-Revision-Date: 2022-12-09 17:04+0200\n"
"Last-Translator: mattias <mattias@webperf.se>\n"
"Language-Team: English <team@webperf.se>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: pygettext.py 1.5\n"


msgid "TEXT_RUNNING_TEST"
msgstr "## Test: 24 - Email (Beta)\n"

msgid "TEXT_REVIEW_MTA_STS_DNS_RECORD_SUPPORT"
msgstr "MTA-STS DNS record found"

msgid "TEXT_REVIEW_MTA_STS_DNS_RECORD_NO_SUPPORT"
msgstr "MTA-STS DNS record not found"

msgid "TEXT_REVIEW_MTA_STS_DNS_RECORD_WRONG_LINEBREAK"
msgstr "MTA-STS TXT doesn't use CRLF for linebreak"

msgid "TEXT_REVIEW_MTA_STS_DNS_RECORD_NOT_ENFORCED"
msgstr "MTA-STS TXT is not enforced using mode"

msgid "TEXT_REVIEW_MTA_STS_DNS_RECORD_VALID_MODE"
msgstr "MTA-STS TXT mode value is valid"

msgid "TEXT_REVIEW_MTA_STS_DNS_RECORD_INVALID_MODE"
msgstr "MTA-STS TXT mode value is invalid"

msgid "TEXT_REVIEW_MTA_STS_TXT_SUPPORT"
msgstr "MTA-STS TXT looks good"

msgid "TEXT_REVIEW_MTA_STS_TXT_INVALID_FORMAT"
msgstr "MTA-STS TXT has invalid format"

msgid "TEXT_REVIEW_MTA_STS_TXT_NO_SUPPORT"
msgstr "MTA-STS TXT not found"

msgid "TEXT_REVIEW_SPF_TO_MANY_DNS_LOOKUPS"
msgstr "SPF DNS record causes to many DNS lookups"

msgid "TEXT_REVIEW_SPF_DNS_RECORD_SUPPORT"
msgstr "SPF DNS record found"

msgid "TEXT_REVIEW_SPF_DNS_RECORD_NO_SUPPORT"
msgstr "SPF DNS record not found"

msgid "TEXT_REVIEW_SPF_DNS_DOUBLE_SPACE_RECORD"
msgstr "SPF DNS record use two spaces instead of one"

msgid "TEXT_REVIEW_SPF_DNS_NEUTRALFAIL_RECORD"
msgstr "SPF DNS record uses neutral fail"

msgid "TEXT_REVIEW_SPF_DNS_SOFTFAIL_RECORD"
msgstr "SPF DNS record uses soft fail"

msgid "TEXT_REVIEW_SPF_DNS_HARDFAIL_RECORD"
msgstr "SPF DNS record uses hard fail"

msgid "TEXT_REVIEW_SPF_DNS_IGNORE_RECORD_NO_SUPPORT"
msgstr "SPF DNS record is configured to be ignored"

msgid "TEXT_REVIEW_SPF_DNS_RECORD_PTR_USED"
msgstr "SPF DNS record is wrongly using PTR"

msgid "TEXT_REVIEW_SPF_UNKNOWN_SECTION"
msgstr "SPF DNS record has unallowed content"

msgid "TEXT_REVIEW_IPV6_OPERATION_SUPPORT"
msgstr "IPV6_OPERATION_SUPPORT"

msgid "TEXT_REVIEW_IPV6_OPERATION_NO_SUPPORT"
msgstr "IPV6_OPERATION_NO_SUPPORT"

msgid "TEXT_REVIEW_IPV6_OPERATION_STARTTLS_SUPPORT"
msgstr "IPV6_OPERATION_STARTTLS_SUPPORT"

msgid "TEXT_REVIEW_IPV6_OPERATION_STARTTLS_NO_SUPPORT"
msgstr "IPV6_OPERATION_STARTTLS_NO_SUPPORT"

msgid "TEXT_REVIEW_IPV4_OPERATION_SUPPORT"
msgstr "IPV4_OPERATION_SUPPORT"

msgid "TEXT_REVIEW_IPV4_OPERATION_NO_SUPPORT"
msgstr "IPV4_OPERATION_NO_SUPPORT"

msgid "TEXT_REVIEW_IPV4_OPERATION_STARTTLS_SUPPORT"
msgstr "IPV4_OPERATION_STARTTLS_SUPPORT"

msgid "TEXT_REVIEW_IPV4_OPERATION_STARTTLS_NO_SUPPORT"
msgstr "IPV4_OPERATION_STARTTLS_NO_SUPPORT"

msgid "TEXT_REVIEW_MX_SUPPORT"
msgstr "MX DNS record found"

msgid "TEXT_REVIEW_MX_NO_SUPPORT"
msgstr "MX DNS record not found"

msgid "TEXT_REVIEW_IPV4_REDUNDANCE"
msgstr "MX DNS IPv4 record redundance"

msgid "TEXT_REVIEW_IPV4_SUPPORT"
msgstr "MX DNS IPv4 record found"

msgid "TEXT_REVIEW_IPV4_NO_REDUNDANCE"
msgstr "MX DNS IPv4 record has no redundance"

msgid "TEXT_REVIEW_IPV4_NO_SUPPORT"
msgstr "MX DNS IPv4 record not found"

msgid "TEXT_REVIEW_IPV6_REDUNDANCE"
msgstr "MX DNS IPv6 record redundance"

msgid "TEXT_REVIEW_IPV6_SUPPORT"
msgstr "MX DNS IPv6 record found"

msgid "TEXT_REVIEW_IPV6_NO_REDUNDANCE"
msgstr "MX DNS IPv6 record has no redundance"

msgid "TEXT_REVIEW_IPV6_NO_SUPPORT"
msgstr "MX DNS IPv6 record not found"
Binary file modified locales/en/LC_MESSAGES/webperf-core.mo
Binary file not shown.
6 changes: 5 additions & 1 deletion locales/en/LC_MESSAGES/webperf-core.po
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ msgid "TEXT_TEST_VALID_ARGUMENTS_ENERGY_EFFICIENCY"
msgstr "-t 22\t: Energy Efficiency (Website Carbon Calculator)"

msgid "TEXT_TEST_VALID_ARGUMENTS_TRACKING"
msgstr "-t 23\t: Tracking & Integrity (Pagexray)"
msgstr "-t 23\t: Tracking and Privacy (Beta)"

msgid "TEXT_TEST_VALID_ARGUMENTS_EMAIL"
msgstr "-t 24\t: 24 - Email (Beta)"


#: default.py:137 default.py:141 default.py:146 default.py:213
msgid "TEXT_COMMAND_USAGE"
Expand Down
Binary file added locales/sv/LC_MESSAGES/email_validator.mo
Binary file not shown.
Loading

0 comments on commit c9fea87

Please sign in to comment.