diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4cb9e1532..cf8185b22 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ on: env: RUSTFLAGS: -Dwarnings - + jobs: lint: name: Rustfmt and Clippy @@ -63,73 +63,73 @@ jobs: python: 3.7 runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@master + - uses: actions/checkout@master - - name: Install Rust ${{ matrix.rust }} - run: rustup toolchain install ${{ matrix.rust }} - - run: rustup override set ${{ matrix.rust }} + - name: Install Rust ${{ matrix.rust }} + run: rustup toolchain install ${{ matrix.rust }} + - run: rustup override set ${{ matrix.rust }} - - name: Cache rust cargo artifacts - uses: swatinem/rust-cache@v2 + - name: Cache rust cargo artifacts + uses: swatinem/rust-cache@v2 - - name: Check - run: cargo check --workspace --bins --examples --tests --benches + - name: Check + run: cargo check --workspace --bins --examples --tests --benches - - name: Tests - run: cargo test --workspace + - name: Tests + run: cargo test --workspace - - name: Test cargo vendor - run: cargo vendor + - name: Test cargo vendor + run: cargo vendor - - name: Install python - if: ${{ matrix.python }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python }} + - name: Install python + if: ${{ matrix.python }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python }} - - name: Install tox - if: ${{ matrix.python }} - run: pip install tox + - name: Install tox + if: ${{ matrix.python }} + run: pip install tox - - name: Build C library - if: ${{ matrix.python }} - run: cargo build -p deltachat_ffi --features jsonrpc + - name: Build C library + if: ${{ matrix.python }} + run: cargo build -p deltachat_ffi --features jsonrpc - - name: Run python tests - if: ${{ matrix.python }} - env: - DCC_NEW_TMP_EMAIL: ${{ secrets.DCC_NEW_TMP_EMAIL }} - DCC_RS_TARGET: debug - DCC_RS_DEV: ${{ github.workspace }} - working-directory: python - run: tox -e lint,mypy,doc,py3 + - name: Run python tests + if: ${{ matrix.python }} + env: + DCC_NEW_TMP_EMAIL: ${{ secrets.DCC_NEW_TMP_EMAIL }} + DCC_RS_TARGET: debug + DCC_RS_DEV: ${{ github.workspace }} + working-directory: python + run: tox -e lint,mypy,doc,py3 - - name: Build deltachat-rpc-server - if: ${{ matrix.python }} - run: cargo build -p deltachat-rpc-server + - name: Build deltachat-rpc-server + if: ${{ matrix.python }} + run: cargo build -p deltachat-rpc-server - - name: Add deltachat-rpc-server to path - if: ${{ matrix.python }} - run: echo ${{ github.workspace }}/target/debug >> $GITHUB_PATH + - name: Add deltachat-rpc-server to path + if: ${{ matrix.python }} + run: echo ${{ github.workspace }}/target/debug >> $GITHUB_PATH - - name: Run deltachat-rpc-client tests - if: ${{ matrix.python }} - env: - DCC_NEW_TMP_EMAIL: ${{ secrets.DCC_NEW_TMP_EMAIL }} - working-directory: deltachat-rpc-client - run: tox -e py3,lint + - name: Run deltachat-rpc-client tests + if: ${{ matrix.python }} + env: + DCC_NEW_TMP_EMAIL: ${{ secrets.DCC_NEW_TMP_EMAIL }} + working-directory: deltachat-rpc-client + run: tox -e py3,lint - - name: Install pypy - if: ${{ matrix.python }} - uses: actions/setup-python@v4 - with: - python-version: 'pypy${{ matrix.python }}' + - name: Install pypy + if: ${{ matrix.python }} + uses: actions/setup-python@v4 + with: + python-version: "pypy${{ matrix.python }}" - - name: Run pypy tests - if: ${{ matrix.python }} - env: - DCC_NEW_TMP_EMAIL: ${{ secrets.DCC_NEW_TMP_EMAIL }} - DCC_RS_TARGET: debug - DCC_RS_DEV: ${{ github.workspace }} - working-directory: python - run: tox -e pypy3 + - name: Run pypy tests + if: ${{ matrix.python }} + env: + DCC_NEW_TMP_EMAIL: ${{ secrets.DCC_NEW_TMP_EMAIL }} + DCC_RS_TARGET: debug + DCC_RS_DEV: ${{ github.workspace }} + working-directory: python + run: tox -e pypy3 diff --git a/.github/workflows/jsonrpc-client-npm-package.yml b/.github/workflows/jsonrpc-client-npm-package.yml index a1c3b4b82..7d7f0145e 100644 --- a/.github/workflows/jsonrpc-client-npm-package.yml +++ b/.github/workflows/jsonrpc-client-npm-package.yml @@ -1,15 +1,14 @@ -name: 'jsonrpc js client build' +name: "jsonrpc js client build" on: pull_request: push: tags: - - '*' - - '!py-*' - + - "*" + - "!py-*" jobs: 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 steps: - name: Install tree @@ -18,7 +17,7 @@ jobs: uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: '16' + node-version: "16" - name: Get tag id: tag uses: dawidd6/action-get-tag@v1 @@ -69,9 +68,9 @@ jobs: if: steps.upload-preview.outcome == 'success' run: node ./node/scripts/postLinksToDetails.js env: - URL: preview/${{ env.DELTACHAT_JSONRPC_TAR_GZ }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - MSG_CONTEXT: Download the deltachat-jsonrpc-client.tgz + URL: preview/${{ env.DELTACHAT_JSONRPC_TAR_GZ }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + MSG_CONTEXT: Download the deltachat-jsonrpc-client.tgz # Upload to download.delta.chat/node/ - name: Upload deltachat-jsonrpc-client build to download.delta.chat/node/ if: ${{ steps.tag.outputs.tag }} diff --git a/.github/workflows/node-delete-preview.yml b/.github/workflows/node-delete-preview.yml index ba698c846..447448cd1 100644 --- a/.github/workflows/node-delete-preview.yml +++ b/.github/workflows/node-delete-preview.yml @@ -7,26 +7,25 @@ on: jobs: delete: - runs-on: ubuntu-latest steps: - - name: Get Pullrequest ID - id: getid - run: | - export PULLREQUEST_ID=$(jq .number < $GITHUB_EVENT_PATH) - echo "prid=$PULLREQUEST_ID" >> $GITHUB_OUTPUT - - name: Renaming - run: | - # 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 - cp empty deltachat-node-${{ steps.getid.outputs.prid }}.tar.gz - - name: Replace builds with dummy files - uses: horochx/deploy-via-scp@v1.0.1 - with: - user: ${{ secrets.USERNAME }} - key: ${{ secrets.SSH_KEY }} - host: "download.delta.chat" - port: 22 - local: "deltachat-node-${{ steps.getid.outputs.prid }}.tar.gz" - remote: "/var/www/html/download/node/preview/" + - name: Get Pullrequest ID + id: getid + run: | + export PULLREQUEST_ID=$(jq .number < $GITHUB_EVENT_PATH) + echo "prid=$PULLREQUEST_ID" >> $GITHUB_OUTPUT + - name: Renaming + run: | + # 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 + cp empty deltachat-node-${{ steps.getid.outputs.prid }}.tar.gz + - name: Replace builds with dummy files + uses: horochx/deploy-via-scp@v1.0.1 + with: + user: ${{ secrets.USERNAME }} + key: ${{ secrets.SSH_KEY }} + host: "download.delta.chat" + port: 22 + local: "deltachat-node-${{ steps.getid.outputs.prid }}.tar.gz" + remote: "/var/www/html/download/node/preview/" diff --git a/.github/workflows/node-docs.yml b/.github/workflows/node-docs.yml index a7c07e0d9..1cd1a60d4 100644 --- a/.github/workflows/node-docs.yml +++ b/.github/workflows/node-docs.yml @@ -9,26 +9,26 @@ jobs: generate: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v3 - - name: Use Node.js 16.x - uses: actions/setup-node@v3 - with: - node-version: 16.x + - name: Use Node.js 16.x + uses: actions/setup-node@v3 + with: + node-version: 16.x - - name: npm install and generate documentation - run: | - cd node - npm i --ignore-scripts - npx typedoc - mv docs js + - name: npm install and generate documentation + run: | + cd node + npm i --ignore-scripts + npx typedoc + mv docs js - - name: Upload - uses: horochx/deploy-via-scp@v1.0.1 - with: - user: ${{ secrets.USERNAME }} - key: ${{ secrets.KEY }} - host: "delta.chat" - port: 22 - local: "node/js" - remote: "/var/www/html/" + - name: Upload + uses: horochx/deploy-via-scp@v1.0.1 + with: + user: ${{ secrets.USERNAME }} + key: ${{ secrets.KEY }} + host: "delta.chat" + port: 22 + local: "node/js" + remote: "/var/www/html/" diff --git a/.github/workflows/node-package.yml b/.github/workflows/node-package.yml index f0cb1cc09..b737ca00c 100644 --- a/.github/workflows/node-package.yml +++ b/.github/workflows/node-package.yml @@ -1,11 +1,10 @@ -name: 'node.js build' +name: "node.js build" on: pull_request: push: tags: - - '*' - - '!py-*' - + - "*" + - "!py-*" jobs: prebuild: @@ -19,7 +18,7 @@ jobs: uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: '16' + node-version: "16" - name: System info run: | rustc -vV @@ -74,7 +73,7 @@ jobs: uses: actions/checkout@v3 - uses: actions/setup-node@v2 with: - node-version: '16' + node-version: "16" - name: Get tag id: tag uses: dawidd6/action-get-tag@v1 @@ -152,8 +151,8 @@ jobs: if: steps.upload-preview.outcome == 'success' run: node ./node/scripts/postLinksToDetails.js env: - URL: preview/${{ env.DELTACHAT_NODE_TAR_GZ }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + URL: preview/${{ env.DELTACHAT_NODE_TAR_GZ }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Upload to download.delta.chat/node/ - name: Upload deltachat-node build to download.delta.chat/node/ if: ${{ steps.tag.outputs.tag }} diff --git a/.github/workflows/node-tests.yml b/.github/workflows/node-tests.yml index e0d557d42..73e8d0cc4 100644 --- a/.github/workflows/node-tests.yml +++ b/.github/workflows/node-tests.yml @@ -1,4 +1,4 @@ -name: 'node.js tests' +name: "node.js tests" on: pull_request: push: @@ -19,7 +19,7 @@ jobs: uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: '16' + node-version: "16" - name: System info run: | rustc -vV @@ -59,7 +59,7 @@ jobs: npm run test env: 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 timeout-minutes: 10 if: runner.os == 'Windows' @@ -68,4 +68,4 @@ jobs: npm run test:mocha env: 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" diff --git a/.github/workflows/repl.yml b/.github/workflows/repl.yml index efad7558e..a3d391fe2 100644 --- a/.github/workflows/repl.yml +++ b/.github/workflows/repl.yml @@ -11,13 +11,13 @@ jobs: name: Build REPL example runs-on: windows-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v3 - - name: Build - run: cargo build -p deltachat-repl --features vendored + - name: Build + run: cargo build -p deltachat-repl --features vendored - - name: Upload binary - uses: actions/upload-artifact@v3 - with: - name: repl.exe - path: 'target/debug/deltachat-repl.exe' + - name: Upload binary + uses: actions/upload-artifact@v3 + with: + name: repl.exe + path: "target/debug/deltachat-repl.exe" diff --git a/.github/workflows/upload-docs.yml b/.github/workflows/upload-docs.yml index c624cb081..8f0ceb3c0 100644 --- a/.github/workflows/upload-docs.yml +++ b/.github/workflows/upload-docs.yml @@ -8,20 +8,18 @@ on: jobs: build: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Build the documentation with cargo - run: | - cargo doc --package deltachat --no-deps - - name: Upload to rs.delta.chat - uses: up9cloud/action-rsync@v1.3 - env: - USER: ${{ secrets.USERNAME }} - KEY: ${{ secrets.KEY }} - HOST: "delta.chat" - SOURCE: "target/doc" - TARGET: "/var/www/html/rs/" - + - uses: actions/checkout@v3 + - name: Build the documentation with cargo + run: | + cargo doc --package deltachat --no-deps + - name: Upload to rs.delta.chat + uses: up9cloud/action-rsync@v1.3 + env: + USER: ${{ secrets.USERNAME }} + KEY: ${{ secrets.KEY }} + HOST: "delta.chat" + SOURCE: "target/doc" + TARGET: "/var/www/html/rs/" diff --git a/.github/workflows/upload-ffi-docs.yml b/.github/workflows/upload-ffi-docs.yml index 73fa07cb1..c230b715e 100644 --- a/.github/workflows/upload-ffi-docs.yml +++ b/.github/workflows/upload-ffi-docs.yml @@ -8,20 +8,18 @@ on: jobs: build: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Build the documentation with cargo - run: | - cargo doc --package deltachat_ffi --no-deps - - name: Upload to cffi.delta.chat - uses: up9cloud/action-rsync@v1.3 - env: - USER: ${{ secrets.USERNAME }} - KEY: ${{ secrets.KEY }} - HOST: "delta.chat" - SOURCE: "target/doc" - TARGET: "/var/www/html/cffi/" - + - uses: actions/checkout@v3 + - name: Build the documentation with cargo + run: | + cargo doc --package deltachat_ffi --no-deps + - name: Upload to cffi.delta.chat + uses: up9cloud/action-rsync@v1.3 + env: + USER: ${{ secrets.USERNAME }} + KEY: ${{ secrets.KEY }} + HOST: "delta.chat" + SOURCE: "target/doc" + TARGET: "/var/www/html/cffi/"