mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 17:36:29 +03:00
ci: format .yml with prettier
This commit is contained in:
114
.github/workflows/ci.yml
vendored
114
.github/workflows/ci.yml
vendored
@@ -8,7 +8,7 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
RUSTFLAGS: -Dwarnings
|
RUSTFLAGS: -Dwarnings
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
name: Rustfmt and Clippy
|
name: Rustfmt and Clippy
|
||||||
@@ -63,73 +63,73 @@ jobs:
|
|||||||
python: 3.7
|
python: 3.7
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@master
|
||||||
|
|
||||||
- name: Install Rust ${{ matrix.rust }}
|
- name: Install Rust ${{ matrix.rust }}
|
||||||
run: rustup toolchain install ${{ matrix.rust }}
|
run: rustup toolchain install ${{ matrix.rust }}
|
||||||
- run: rustup override set ${{ matrix.rust }}
|
- run: rustup override set ${{ matrix.rust }}
|
||||||
|
|
||||||
- name: Cache rust cargo artifacts
|
- name: Cache rust cargo artifacts
|
||||||
uses: swatinem/rust-cache@v2
|
uses: swatinem/rust-cache@v2
|
||||||
|
|
||||||
- name: Check
|
- name: Check
|
||||||
run: cargo check --workspace --bins --examples --tests --benches
|
run: cargo check --workspace --bins --examples --tests --benches
|
||||||
|
|
||||||
- name: Tests
|
- name: Tests
|
||||||
run: cargo test --workspace
|
run: cargo test --workspace
|
||||||
|
|
||||||
- name: Test cargo vendor
|
- name: Test cargo vendor
|
||||||
run: cargo vendor
|
run: cargo vendor
|
||||||
|
|
||||||
- name: Install python
|
- name: Install python
|
||||||
if: ${{ matrix.python }}
|
if: ${{ matrix.python }}
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python }}
|
python-version: ${{ matrix.python }}
|
||||||
|
|
||||||
- name: Install tox
|
- name: Install tox
|
||||||
if: ${{ matrix.python }}
|
if: ${{ matrix.python }}
|
||||||
run: pip install tox
|
run: pip install tox
|
||||||
|
|
||||||
- name: Build C library
|
- name: Build C library
|
||||||
if: ${{ matrix.python }}
|
if: ${{ matrix.python }}
|
||||||
run: cargo build -p deltachat_ffi --features jsonrpc
|
run: cargo build -p deltachat_ffi --features jsonrpc
|
||||||
|
|
||||||
- name: Run python tests
|
- name: Run python tests
|
||||||
if: ${{ matrix.python }}
|
if: ${{ matrix.python }}
|
||||||
env:
|
env:
|
||||||
DCC_NEW_TMP_EMAIL: ${{ secrets.DCC_NEW_TMP_EMAIL }}
|
DCC_NEW_TMP_EMAIL: ${{ secrets.DCC_NEW_TMP_EMAIL }}
|
||||||
DCC_RS_TARGET: debug
|
DCC_RS_TARGET: debug
|
||||||
DCC_RS_DEV: ${{ github.workspace }}
|
DCC_RS_DEV: ${{ github.workspace }}
|
||||||
working-directory: python
|
working-directory: python
|
||||||
run: tox -e lint,mypy,doc,py3
|
run: tox -e lint,mypy,doc,py3
|
||||||
|
|
||||||
- name: Build deltachat-rpc-server
|
- name: Build deltachat-rpc-server
|
||||||
if: ${{ matrix.python }}
|
if: ${{ matrix.python }}
|
||||||
run: cargo build -p deltachat-rpc-server
|
run: cargo build -p deltachat-rpc-server
|
||||||
|
|
||||||
- name: Add deltachat-rpc-server to path
|
- name: Add deltachat-rpc-server to path
|
||||||
if: ${{ matrix.python }}
|
if: ${{ matrix.python }}
|
||||||
run: echo ${{ github.workspace }}/target/debug >> $GITHUB_PATH
|
run: echo ${{ github.workspace }}/target/debug >> $GITHUB_PATH
|
||||||
|
|
||||||
- name: Run deltachat-rpc-client tests
|
- name: Run deltachat-rpc-client tests
|
||||||
if: ${{ matrix.python }}
|
if: ${{ matrix.python }}
|
||||||
env:
|
env:
|
||||||
DCC_NEW_TMP_EMAIL: ${{ secrets.DCC_NEW_TMP_EMAIL }}
|
DCC_NEW_TMP_EMAIL: ${{ secrets.DCC_NEW_TMP_EMAIL }}
|
||||||
working-directory: deltachat-rpc-client
|
working-directory: deltachat-rpc-client
|
||||||
run: tox -e py3,lint
|
run: tox -e py3,lint
|
||||||
|
|
||||||
- name: Install pypy
|
- name: Install pypy
|
||||||
if: ${{ matrix.python }}
|
if: ${{ matrix.python }}
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: 'pypy${{ matrix.python }}'
|
python-version: "pypy${{ matrix.python }}"
|
||||||
|
|
||||||
- name: Run pypy tests
|
- name: Run pypy tests
|
||||||
if: ${{ matrix.python }}
|
if: ${{ matrix.python }}
|
||||||
env:
|
env:
|
||||||
DCC_NEW_TMP_EMAIL: ${{ secrets.DCC_NEW_TMP_EMAIL }}
|
DCC_NEW_TMP_EMAIL: ${{ secrets.DCC_NEW_TMP_EMAIL }}
|
||||||
DCC_RS_TARGET: debug
|
DCC_RS_TARGET: debug
|
||||||
DCC_RS_DEV: ${{ github.workspace }}
|
DCC_RS_DEV: ${{ github.workspace }}
|
||||||
working-directory: python
|
working-directory: python
|
||||||
run: tox -e pypy3
|
run: tox -e pypy3
|
||||||
|
|||||||
17
.github/workflows/jsonrpc-client-npm-package.yml
vendored
17
.github/workflows/jsonrpc-client-npm-package.yml
vendored
@@ -1,15 +1,14 @@
|
|||||||
name: 'jsonrpc js client build'
|
name: "jsonrpc js client build"
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- '*'
|
- "*"
|
||||||
- '!py-*'
|
- "!py-*"
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pack-module:
|
pack-module:
|
||||||
name: 'Package @deltachat/jsonrpc-client and upload to download.delta.chat'
|
name: "Package @deltachat/jsonrpc-client and upload to download.delta.chat"
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
- name: Install tree
|
- name: Install tree
|
||||||
@@ -18,7 +17,7 @@ jobs:
|
|||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: '16'
|
node-version: "16"
|
||||||
- name: Get tag
|
- name: Get tag
|
||||||
id: tag
|
id: tag
|
||||||
uses: dawidd6/action-get-tag@v1
|
uses: dawidd6/action-get-tag@v1
|
||||||
@@ -69,9 +68,9 @@ jobs:
|
|||||||
if: steps.upload-preview.outcome == 'success'
|
if: steps.upload-preview.outcome == 'success'
|
||||||
run: node ./node/scripts/postLinksToDetails.js
|
run: node ./node/scripts/postLinksToDetails.js
|
||||||
env:
|
env:
|
||||||
URL: preview/${{ env.DELTACHAT_JSONRPC_TAR_GZ }}
|
URL: preview/${{ env.DELTACHAT_JSONRPC_TAR_GZ }}
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
MSG_CONTEXT: Download the deltachat-jsonrpc-client.tgz
|
MSG_CONTEXT: Download the deltachat-jsonrpc-client.tgz
|
||||||
# Upload to download.delta.chat/node/
|
# Upload to download.delta.chat/node/
|
||||||
- name: Upload deltachat-jsonrpc-client build to download.delta.chat/node/
|
- name: Upload deltachat-jsonrpc-client build to download.delta.chat/node/
|
||||||
if: ${{ steps.tag.outputs.tag }}
|
if: ${{ steps.tag.outputs.tag }}
|
||||||
|
|||||||
39
.github/workflows/node-delete-preview.yml
vendored
39
.github/workflows/node-delete-preview.yml
vendored
@@ -7,26 +7,25 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
delete:
|
delete:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Get Pullrequest ID
|
- name: Get Pullrequest ID
|
||||||
id: getid
|
id: getid
|
||||||
run: |
|
run: |
|
||||||
export PULLREQUEST_ID=$(jq .number < $GITHUB_EVENT_PATH)
|
export PULLREQUEST_ID=$(jq .number < $GITHUB_EVENT_PATH)
|
||||||
echo "prid=$PULLREQUEST_ID" >> $GITHUB_OUTPUT
|
echo "prid=$PULLREQUEST_ID" >> $GITHUB_OUTPUT
|
||||||
- name: Renaming
|
- name: Renaming
|
||||||
run: |
|
run: |
|
||||||
# create empty file to copy it over the outdated deliverable on download.delta.chat
|
# create empty file to copy it over the outdated deliverable on download.delta.chat
|
||||||
echo "This preview build is outdated and has been removed." > empty
|
echo "This preview build is outdated and has been removed." > empty
|
||||||
cp empty deltachat-node-${{ steps.getid.outputs.prid }}.tar.gz
|
cp empty deltachat-node-${{ steps.getid.outputs.prid }}.tar.gz
|
||||||
- name: Replace builds with dummy files
|
- name: Replace builds with dummy files
|
||||||
uses: horochx/deploy-via-scp@v1.0.1
|
uses: horochx/deploy-via-scp@v1.0.1
|
||||||
with:
|
with:
|
||||||
user: ${{ secrets.USERNAME }}
|
user: ${{ secrets.USERNAME }}
|
||||||
key: ${{ secrets.SSH_KEY }}
|
key: ${{ secrets.SSH_KEY }}
|
||||||
host: "download.delta.chat"
|
host: "download.delta.chat"
|
||||||
port: 22
|
port: 22
|
||||||
local: "deltachat-node-${{ steps.getid.outputs.prid }}.tar.gz"
|
local: "deltachat-node-${{ steps.getid.outputs.prid }}.tar.gz"
|
||||||
remote: "/var/www/html/download/node/preview/"
|
remote: "/var/www/html/download/node/preview/"
|
||||||
|
|||||||
40
.github/workflows/node-docs.yml
vendored
40
.github/workflows/node-docs.yml
vendored
@@ -9,26 +9,26 @@ jobs:
|
|||||||
generate:
|
generate:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Use Node.js 16.x
|
- name: Use Node.js 16.x
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 16.x
|
node-version: 16.x
|
||||||
|
|
||||||
- name: npm install and generate documentation
|
- name: npm install and generate documentation
|
||||||
run: |
|
run: |
|
||||||
cd node
|
cd node
|
||||||
npm i --ignore-scripts
|
npm i --ignore-scripts
|
||||||
npx typedoc
|
npx typedoc
|
||||||
mv docs js
|
mv docs js
|
||||||
|
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: horochx/deploy-via-scp@v1.0.1
|
uses: horochx/deploy-via-scp@v1.0.1
|
||||||
with:
|
with:
|
||||||
user: ${{ secrets.USERNAME }}
|
user: ${{ secrets.USERNAME }}
|
||||||
key: ${{ secrets.KEY }}
|
key: ${{ secrets.KEY }}
|
||||||
host: "delta.chat"
|
host: "delta.chat"
|
||||||
port: 22
|
port: 22
|
||||||
local: "node/js"
|
local: "node/js"
|
||||||
remote: "/var/www/html/"
|
remote: "/var/www/html/"
|
||||||
|
|||||||
15
.github/workflows/node-package.yml
vendored
15
.github/workflows/node-package.yml
vendored
@@ -1,11 +1,10 @@
|
|||||||
name: 'node.js build'
|
name: "node.js build"
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- '*'
|
- "*"
|
||||||
- '!py-*'
|
- "!py-*"
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
prebuild:
|
prebuild:
|
||||||
@@ -19,7 +18,7 @@ jobs:
|
|||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: '16'
|
node-version: "16"
|
||||||
- name: System info
|
- name: System info
|
||||||
run: |
|
run: |
|
||||||
rustc -vV
|
rustc -vV
|
||||||
@@ -74,7 +73,7 @@ jobs:
|
|||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: '16'
|
node-version: "16"
|
||||||
- name: Get tag
|
- name: Get tag
|
||||||
id: tag
|
id: tag
|
||||||
uses: dawidd6/action-get-tag@v1
|
uses: dawidd6/action-get-tag@v1
|
||||||
@@ -152,8 +151,8 @@ jobs:
|
|||||||
if: steps.upload-preview.outcome == 'success'
|
if: steps.upload-preview.outcome == 'success'
|
||||||
run: node ./node/scripts/postLinksToDetails.js
|
run: node ./node/scripts/postLinksToDetails.js
|
||||||
env:
|
env:
|
||||||
URL: preview/${{ env.DELTACHAT_NODE_TAR_GZ }}
|
URL: preview/${{ env.DELTACHAT_NODE_TAR_GZ }}
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# Upload to download.delta.chat/node/
|
# Upload to download.delta.chat/node/
|
||||||
- name: Upload deltachat-node build to download.delta.chat/node/
|
- name: Upload deltachat-node build to download.delta.chat/node/
|
||||||
if: ${{ steps.tag.outputs.tag }}
|
if: ${{ steps.tag.outputs.tag }}
|
||||||
|
|||||||
8
.github/workflows/node-tests.yml
vendored
8
.github/workflows/node-tests.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: 'node.js tests'
|
name: "node.js tests"
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
@@ -19,7 +19,7 @@ jobs:
|
|||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: '16'
|
node-version: "16"
|
||||||
- name: System info
|
- name: System info
|
||||||
run: |
|
run: |
|
||||||
rustc -vV
|
rustc -vV
|
||||||
@@ -59,7 +59,7 @@ jobs:
|
|||||||
npm run test
|
npm run test
|
||||||
env:
|
env:
|
||||||
DCC_NEW_TMP_EMAIL: ${{ secrets.DCC_NEW_TMP_EMAIL }}
|
DCC_NEW_TMP_EMAIL: ${{ secrets.DCC_NEW_TMP_EMAIL }}
|
||||||
NODE_OPTIONS: '--force-node-api-uncaught-exceptions-policy=true'
|
NODE_OPTIONS: "--force-node-api-uncaught-exceptions-policy=true"
|
||||||
- name: Run tests on Windows, except lint
|
- name: Run tests on Windows, except lint
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
@@ -68,4 +68,4 @@ jobs:
|
|||||||
npm run test:mocha
|
npm run test:mocha
|
||||||
env:
|
env:
|
||||||
DCC_NEW_TMP_EMAIL: ${{ secrets.DCC_NEW_TMP_EMAIL }}
|
DCC_NEW_TMP_EMAIL: ${{ secrets.DCC_NEW_TMP_EMAIL }}
|
||||||
NODE_OPTIONS: '--force-node-api-uncaught-exceptions-policy=true'
|
NODE_OPTIONS: "--force-node-api-uncaught-exceptions-policy=true"
|
||||||
|
|||||||
16
.github/workflows/repl.yml
vendored
16
.github/workflows/repl.yml
vendored
@@ -11,13 +11,13 @@ jobs:
|
|||||||
name: Build REPL example
|
name: Build REPL example
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cargo build -p deltachat-repl --features vendored
|
run: cargo build -p deltachat-repl --features vendored
|
||||||
|
|
||||||
- name: Upload binary
|
- name: Upload binary
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: repl.exe
|
name: repl.exe
|
||||||
path: 'target/debug/deltachat-repl.exe'
|
path: "target/debug/deltachat-repl.exe"
|
||||||
|
|||||||
26
.github/workflows/upload-docs.yml
vendored
26
.github/workflows/upload-docs.yml
vendored
@@ -8,20 +8,18 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Build the documentation with cargo
|
- name: Build the documentation with cargo
|
||||||
run: |
|
run: |
|
||||||
cargo doc --package deltachat --no-deps
|
cargo doc --package deltachat --no-deps
|
||||||
- name: Upload to rs.delta.chat
|
- name: Upload to rs.delta.chat
|
||||||
uses: up9cloud/action-rsync@v1.3
|
uses: up9cloud/action-rsync@v1.3
|
||||||
env:
|
env:
|
||||||
USER: ${{ secrets.USERNAME }}
|
USER: ${{ secrets.USERNAME }}
|
||||||
KEY: ${{ secrets.KEY }}
|
KEY: ${{ secrets.KEY }}
|
||||||
HOST: "delta.chat"
|
HOST: "delta.chat"
|
||||||
SOURCE: "target/doc"
|
SOURCE: "target/doc"
|
||||||
TARGET: "/var/www/html/rs/"
|
TARGET: "/var/www/html/rs/"
|
||||||
|
|
||||||
|
|||||||
26
.github/workflows/upload-ffi-docs.yml
vendored
26
.github/workflows/upload-ffi-docs.yml
vendored
@@ -8,20 +8,18 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Build the documentation with cargo
|
- name: Build the documentation with cargo
|
||||||
run: |
|
run: |
|
||||||
cargo doc --package deltachat_ffi --no-deps
|
cargo doc --package deltachat_ffi --no-deps
|
||||||
- name: Upload to cffi.delta.chat
|
- name: Upload to cffi.delta.chat
|
||||||
uses: up9cloud/action-rsync@v1.3
|
uses: up9cloud/action-rsync@v1.3
|
||||||
env:
|
env:
|
||||||
USER: ${{ secrets.USERNAME }}
|
USER: ${{ secrets.USERNAME }}
|
||||||
KEY: ${{ secrets.KEY }}
|
KEY: ${{ secrets.KEY }}
|
||||||
HOST: "delta.chat"
|
HOST: "delta.chat"
|
||||||
SOURCE: "target/doc"
|
SOURCE: "target/doc"
|
||||||
TARGET: "/var/www/html/cffi/"
|
TARGET: "/var/www/html/cffi/"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user