Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
6053f63
🐳Publish docker image for federation server
shepilov Jan 31, 2024
b129fb0
🐳Publish docker image for federation server
shepilov Jan 31, 2024
18cbf7e
🐳Publish docker image for federation server
shepilov Jan 31, 2024
f8bfe9c
🐳Publish docker image for federation server
shepilov Jan 31, 2024
b16fb45
🐳Publish docker image for federation server
shepilov Jan 31, 2024
b98ff04
🐳Publish docker image for federation server
shepilov Jan 31, 2024
0d03db3
🐳Publish docker image for federation server
shepilov Jan 31, 2024
8520730
🐳Publish docker image for federation server
shepilov Jan 31, 2024
c14d362
🐳Publish docker image for federation server
shepilov Jan 31, 2024
0bd0a3a
🐳Publish docker image for federation server
shepilov Jan 31, 2024
282fbd3
🐳Publish docker image for federation server
shepilov Jan 31, 2024
2138f8e
🐳Publish docker image for federation server
shepilov Jan 31, 2024
ec54776
🐳Publish docker image for federation server
shepilov Jan 31, 2024
29e73cf
🐳Publish docker image for federation server
shepilov Jan 31, 2024
7ac3004
🐳Publish docker image for federation server
shepilov Jan 31, 2024
88d5e81
🐳Publish docker image for federation server
shepilov Jan 31, 2024
b0f2059
🐳Publish docker image for federation server
shepilov Jan 31, 2024
7f5ad92
🐳Publish docker image for federation server
shepilov Jan 31, 2024
852be95
🐳Publish docker image for federation server
shepilov Jan 31, 2024
e56df9c
🐳Publish docker image for federation server
shepilov Jan 31, 2024
ba7b2b3
🐳Publish docker image for federation server
shepilov Jan 31, 2024
941722d
🐳Publish docker image for federation server
shepilov Jan 31, 2024
27b0a56
🐳Publish docker image for federation server
shepilov Jan 31, 2024
aa85d9e
🐳Publish docker image for federation server
shepilov Jan 31, 2024
fc1dbeb
🐳Publish docker image for federation server
shepilov Jan 31, 2024
3954f07
🐳Publish docker image for federation server
shepilov Jan 31, 2024
fb4a39c
🐳Publish docker image for federation server
shepilov Jan 31, 2024
8ea8eb6
🐳Publish docker image for federation server
shepilov Jan 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: build-and-test

on:
workflow_call:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node LTS
uses: actions/setup-node@v3
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Build packages
run: npm run build

test:
runs-on: ubuntu-latest
needs: build
steps:
- name: Add hosts for integration tests
run: sudo echo "127.0.0.1 localhost auth.example.com matrix.example.com matrix1.example.com matrix2.example.com matrix3.example.com federation.example.com" | sudo tee -a /etc/hosts
- uses: actions/checkout@v3
- name: Set up Node LTS
uses: actions/setup-node@v3
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Install playwright test browsers
run: npx playwright install
- name: Run all tests
run: npm test
105 changes: 0 additions & 105 deletions .github/workflows/github-ci.yml

This file was deleted.

14 changes: 14 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: pr

on:
pull_request_target:
branches:
- main
merge_group:
workflow_dispatch:

jobs:
test:
name: Build And Test
uses: ./.github/workflows/build-and-test.yml
secrets: inherit
31 changes: 31 additions & 0 deletions .github/workflows/publish-matrix-invite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: publish-matrix-invite

on:
workflow_call:

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get all src files that have changed
id: changed-files
uses: tj-actions/changed-files@v41
with:
files: |
packages/matrix-invite/**/*
.github/workflows/**
- name: Publish to dockerhub
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: linagora/matrix-invite
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
workdir: "${{ github.workspace }}/packages/matrix-invite"
context: .
buildoptions: "-t linagora/matrix-invite -f Dockerfile"
tags: "latest"

30 changes: 30 additions & 0 deletions .github/workflows/publish-tom-federation-server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: publish-tom-federation-server

on:
workflow_call:

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get all src files that have changed
id: changed-files
uses: tj-actions/changed-files@v41
with:
files: |
packages/federation-server/**/*
.github/workflows/**
- name: Publish to dockerhub
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: linagora/tom-federation-server
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
workdir: "${{ github.workspace }}"
context: .
buildoptions: "-t linagora/tom-federation-server -f packages/federation-server/Dockerfile"
tags: "latest"
30 changes: 30 additions & 0 deletions .github/workflows/publish-tom-server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: publish-tom-server

on:
workflow_call:

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get all src files that have changed
id: changed-files
uses: tj-actions/changed-files@v41
with:
files: |
packages/federation-server/**/*
.github/workflows/**
- name: Publish to dockerhub
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: linagora/tom-server
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
workdir: "${{ github.workspace }}"
context: .
buildoptions: "-t linagora/tom-server -f Dockerfile"
tags: "latest"
26 changes: 26 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
on:
push:
branches:
- main

jobs:
test:
name: Build And Test
uses: ./.github/workflows/build-and-test.yml
secrets: inherit
publish-federation-server:
name: Publish Federation Server
uses: ./.github/workflows/publish-tom-federation-server.yml
secrets: inherit
publish-tom-server:
name: Publish ToM Server
uses: ./.github/workflows/publish-tom-server.yml
secrets: inherit
publish-matrix-invite:
name: Publish Matrix Invite
uses: ./.github/workflows/publish-matrix-invite.yml
secrets: inherit
upadte-docs:
name: Update Docs
uses: ./.github/workflows/update-docs.yml
secrets: inherit
42 changes: 42 additions & 0 deletions .github/workflows/update-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: update-docs

on:
workflow_call:

jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up Node LTS
uses: actions/setup-node@v3
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Generate Swagger documentation
run: npm run doc
- name: Check if documentation files has changed
id: verify-changed-files
uses: tj-actions/verify-changed-files@v17
with:
files: docs/openapi.json
- name: Update documentation files
if: steps.verify-changed-files.outputs.files_changed == 'true'
env:
SPEC_TO_DISPLAY: "openapi.json"
DISABLE_TRY_IT_OUT_JS_METHOD: "const DisableTryItOutPlugin = function() {return {statePlugins:{spec:{wrapSelectors:{allowTryItOutFor:() => () => false}}}}}"
DISABLE_TRY_IT_OUT_PLUGIN: ", DisableTryItOutPlugin"
run: |
yes | cp -rf node_modules/swagger-ui-dist/* docs
sed -i "/window\.onload\s=\sfunction()\s{/a $DISABLE_TRY_IT_OUT_JS_METHOD" docs/swagger-initializer.js
sed -i "s#https://petstore\.swagger\.io/v2/swagger\.json#$SPEC_TO_DISPLAY#g" docs/swagger-initializer.js
sed -i "/SwaggerUIBundle\.plugins\.DownloadUrl/a $DISABLE_TRY_IT_OUT_PLUGIN" docs/swagger-initializer.js
- name: Commit updated documentation files
if: steps.verify-changed-files.outputs.files_changed == 'true'
uses: EndBug/add-and-commit@v9
with:
add: docs
message: 'chore: update documentation'