Skip to content
Snippets Groups Projects
Commit 25d752b0 authored by Éloïs's avatar Éloïs
Browse files

Merge branch 'ci' into dev

parents 771b5bdb b44f8671
No related branches found
No related tags found
No related merge requests found
......@@ -24,7 +24,7 @@ workflow:
- server.ts
- yarn.lock
.nvm_env: &nvm_env
.env: &env
image: registry.duniter.org/docker/duniter-ci:v0.0.4
tags:
- redshift
......@@ -35,9 +35,12 @@ workflow:
- nvm use 10.19.0
- curl https://sh.rustup.rs -sSf | sh -s -- -y
- export PATH="$HOME/.cargo/bin:$PATH"
- export RUSTFLAGS="-D warnings"
- rustup show && rustc --version && cargo --version
.cached_nvm: &cached_nvm
<<: *nvm_env
<<: *env
cache:
untracked: true
paths:
......@@ -49,11 +52,11 @@ workflow:
- redshift
before_script:
- export PATH="$HOME/.cargo/bin:$PATH"
- rustup show
- rustc --version && cargo --version
- rustup show && rustc --version && cargo --version
#pages:
# <<: *nvm_env
# <<: *env
# stage: pages
# cache: {}
# script:
......@@ -76,27 +79,8 @@ workflow:
# - loki
# - dev
tests:rs:
extends: .nvm_env
rules:
- if: $CI_COMMIT_TAG
when: never
- if: $CI_MERGE_REQUEST_ID
when: manual
- when: on_success
stage: tests
script:
- cargo fmt -- --version
- cargo fmt -- --check
- RUSTFLAGS="-D warnings" cargo build
- cargo test --all
# Coverage (doesn't make sense yet)
#- cargo test --doc
#- cargo tarpaulin --ignore-tests -iv --out Xml
#- bash <(curl -s https://codecov.io/bash)
tests:ts:
<<: *nvm_env
tests:
<<: *env
rules:
- if: $CI_COMMIT_TAG
when: never
......@@ -117,15 +101,17 @@ tests:ts:
- coverage.tar.gz
expire_in: 4h
clippy:
extends: .nvm_env
fmt_and_clippy:
extends: .env
rules:
- if: $CI_COMMIT_TAG
when: never
- if: $CI_MERGE_REQUEST_ID
- when: manual
- when: on_success
stage: quality
script:
- cargo fmt -- --version
- cargo fmt -- --check
- cargo clippy -- -V
- cargo clippy --all --tests -- -D warnings --verbose
......@@ -145,7 +131,7 @@ audit_dependencies:
- when: manual
sync_g1:
<<: *nvm_env
<<: *env
<<: *integration_rules
stage: integration
script:
......@@ -153,7 +139,7 @@ sync_g1:
- bash .gitlab/test/check_g1_sync.sh
sync_gtest:
<<: *nvm_env
<<: *env
<<: *integration_rules
stage: integration
script:
......
# Nodejs software
language: node_js
node_js:
- 8.9.2
env:
- CXX=g++-4.8
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
code_climate:
repo_token: 67f8f00d5cf9e5c46b7644aebee5ac9df9d6ee267014a6f61a7a7b1048357a1c
sudo: false
dist: precise
# Unit Tests (+code coverage)
script: npm run-script test-travis
after_success:
# Send coverage data to Coveralls
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
- rm -Rf ./coverage
deploy:
- provider: npm
email: cem.moreau@gmail.com
skip_cleanup: true
api_key:
secure: gZV7yLxDwwxD4oQXl1hwugmtnWXqP8vojuVGtAGwtMlwJE0n270w6O5xZHDd7DSmOZLftk6/wue/RdhLDsD6J1z3Uxu+VoUWy7aG/sFcGRaBwct+bGqFGkyd+I1mCXFnAZMDwbtgdkQlOCS9PM1BfMEYq49XXqaLaDnwouR+2bI=
on:
tags: true
repo: duniter/duniter
environment:
matrix:
- nodejs_version: "8.9.2"
ADDON_VERSION: "48"
platform:
- x64
install:
- echo %ADDON_VERSION%
- ps: Update-NodeJsInstallation $env:nodejs_version $env:platform
- node -v
- npm install -g npm
- npm install -g nw-gyp node-pre-gyp
- npm install
build: off
......@@ -27,7 +27,9 @@
"tsc": "tsc",
"tscw": "tsc -w",
"doc": "typedoc --out typedoc/ index.ts app/ --mode file --readme README.md --includeDeclarations --sourcefile-url-prefix \"https://git.duniter.org/nodes/typescript/duniter/blob/loki/\"",
"test": "nyc --reporter html mocha",
"test": "cargo test --all && nyc --reporter html mocha",
"test:rs": "cargo test --all",
"test:ts": "nyc --reporter html mocha",
"start": "node bin/duniter start",
"build": "./neon/build.sh && cd.. && tsc && cd \"../node_modules/duniter-ui\" && npm install && npm run build",
"install": "./neon/build.sh",
......@@ -35,8 +37,7 @@
"prettier": "prettier --write app/**/*/*.ts",
"reformat": "eslint --cache --fix app/**/*/*.ts",
"format:check": "prettier --list-different \"app/**/*.{ts,json}\"",
"format:all": "prettier --write \"app/**/*.{ts,json}\"",
"test-travis": "nyc --reporter lcovonly mocha test/"
"format:all": "prettier --write \"app/**/*.{ts,json}\""
},
"nyc": {
"require": [
......
#!/bin/bash
### Releasing
current=`grep -P "version\": \"\d+.\d+.\d+(\w*)" package.json | grep -oP "\d+.\d+.\d+(\w*)"`
current=`grep -P "version\": \"\d+.\d+.\d+(-\w*)" package.json | grep -oP "\d+.\d+.\d+(-\w*)"`
echo "Current version: $current"
if [[ $1 =~ ^[0-9]+.[0-9]+.[0-9]+((a|b)[0-9]+)?$ ]]; then
if [[ $1 =~ ^[0-9]+.[0-9]+.[0-9]+(-(alpha|beta|rc)[0-9]*)?$ ]]; then
echo "Changing to version: $1"
# Change the version in package.json and test file
sed -i "s/version\": .*/version\": \"$1\",/g" package.json
sed -i "s/Version: .*/Version: $1/g" release/extra/debian/package/DEBIAN/control
sed -i "s/ release: .*/ release: v$1/g" appveyor.yml
# Duniter.iss (Windows installer)
sed -i "s/define MyAppVerStr.*/define MyAppVerStr \"v$1\"/g" release/arch/windows/duniter.iss
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment