Skip to content

Commit

Permalink
Merge branch 'master' into remove-obsolete-image-names
Browse files Browse the repository at this point in the history
  • Loading branch information
mahula authored Jun 22, 2024
2 parents f8c6a62 + 0b985a9 commit e6d3d6e
Show file tree
Hide file tree
Showing 128 changed files with 33,194 additions and 3,941 deletions.
34 changes: 34 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -295,3 +295,37 @@ updates:
day: "saturday"
timezone: "Europe/Berlin"
time: "03:00"

- package-ecosystem: npm
open-pull-requests-limit: 99
directory: "/tests"
rebase-strategy: "disabled"
schedule:
interval: weekly
day: "saturday"
timezone: "Europe/Berlin"
time: "03:00"
groups:
cypress:
applies-to: version-updates
patterns:
- "*cypress*"
- "*cucumber*"
linting:
applies-to: version-updates
patterns:
- "@eslint-community/eslint-plugin-eslint-comments"
- "@typescript-eslint/*"
- "eslint-*"
- "prettier"
exclude-patterns:
- "eslint"
typescript:
applies-to: version-updates
patterns:
- "typescript"
- "ts*"
vuepress:
applies-to: version-updates
patterns:
- "*vuepress*"
13 changes: 12 additions & 1 deletion .github/file-filters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,15 @@ backend-test-build-docs: &backend-test-build-docs
- '.github/file-filters.yml'
- 'backend/**/*.md'
- 'backend/.vuepress/*'
- 'backend/package.json'
- 'backend/package.json'

# e2e - TODO refine separation of docs from code-related files
e2e-all:
- 'tests/**/*'

e2e-docs:
- 'tests/**/*.md'
- '.github/workflows/e2e.test.build.docs.yml'
- '.github/file-filter.yml'
- '.vuepress/*'
- 'package.json'
60 changes: 60 additions & 0 deletions .github/workflows/e2e.run.tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: e2e:test:all test the application end to end

on: push

jobs:
e2e-tests:
name: Run all E2E tests
runs-on: ubuntu-latest
steps:
- name: Set Node version
uses: actions/setup-node@v4
with:
node-version: 21

- name: Checkout
uses: actions/checkout@master

- name: E2E | Boot up test system
run: |
cd authentik/
./database.unpack.sh
docker compose up -d
cd ../frontend
cp .env.dist .env
docker compose -f docker-compose.test.yml up -d frontend
cd ../presenter
cp .env.dist .env
docker compose -f docker-compose.test.yml up -d presenter
sleep 4m
- name: Install cucumber-json-formatter
run: |
wget --no-verbose -O /opt/cucumber-json-formatter "https://github.com/cucumber/json-formatter/releases/download/v19.0.0/cucumber-json-formatter-linux-386"
chmod +x /opt/cucumber-json-formatter
sudo ln -fs /opt/cucumber-json-formatter /usr/bin/cucumber-json-formatter
- name: E2E | Run all tests
id: e2e-run
uses: cypress-io/github-action@v6
with:
working-directory: tests

- name: E2E | if tests failed, compile html report
if: ${{ failure() && steps.e2e-run.conclusion == 'failure' }}
run: |
cd cypress/
npx tsx create-cucumber-html-report.ts
working-directory: tests

- name: Get PR number
if: ${{ failure() && steps.e2e-run.conclusion == 'failure' }}
uses: jwalton/gh-find-current-pr@master
id: pr-number

- name: E2E | if tests failed, upload report
if: ${{ failure() && steps.e2e-run.conclusion == 'failure' }}
uses: actions/upload-artifact@v4
with:
name: boilerplate-e2e-test-report-pr-${{ steps.pr-number.outputs.pr }}
path: /home/runner/work/dreammall.earth/dreammall.earth/tests/cypress/reports/dreammall-e2e_html_report
40 changes: 40 additions & 0 deletions .github/workflows/e2e.test.build.docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: e2e:test:build test docs

on: push

jobs:
files-changed:
name: Detect File Changes
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.e2e-docs }}
steps:
- uses: actions/checkout@master

- name: Check for e2e docs file changes
uses: dorny/paths-filter@v3.0.2
id: changes
with:
token: ${{ github.token }}
filters: .github/file-filters.yml
list-files: shell

build:
if: needs.files-changed.outputs.changes == 'true'
name: Build Docs - E2E Testing
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./tests
steps:
- name: Set Node version
uses: actions/setup-node@v4
with:
node-version: '>=21'

- name: Checkout code
uses: actions/checkout@master

- name: E2E Testing | Build Docs
run: npm install && npm run docs:build
working-directory: ${{env.WORKING_DIRECTORY}}
40 changes: 40 additions & 0 deletions .github/workflows/e2e.test.lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: e2e:test:lint code with defined linters

on: push

jobs:
files-changed:
name: Detect File Changes
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.e2e-all }}
steps:
- uses: actions/checkout@master

- name: Check for frontend file changes
uses: dorny/paths-filter@v3.0.2
id: changes
with:
token: ${{ github.token }}
filters: .github/file-filters.yml
list-files: shell

lint:
if: needs.files-changed.outputs.changes == 'true'
name: Lint - E2E files
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./tests
steps:
- name: Set Node version
uses: actions/setup-node@v4
with:
node-version: '>=21'

- name: Checkout code
uses: actions/checkout@master

- name: E2E files | Lint
run: npm install && npm run test:lint
working-directory: ${{env.WORKING_DIRECTORY}}
Loading

0 comments on commit e6d3d6e

Please sign in to comment.