Skip to content

Commit

Permalink
Merge pull request #1 from trailmix:next
Browse files Browse the repository at this point in the history
adding config
  • Loading branch information
trilom committed Apr 2, 2021
2 parents 46719d1 + 068155f commit 13ad956
Show file tree
Hide file tree
Showing 53 changed files with 3,453 additions and 2,306 deletions.
55 changes: 48 additions & 7 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,69 @@
# codecov:
# notify:
# require_ci_to_pass: yes

coverage:
status:
project:
default:
target: 90%
color:
utilities:
target: auto
threshold: 7%
base: auto
if_ci_failed: success
flags:
- color
- config
- log
- watch
common:
target: 40%
threshold: 10%
if_ci_failed: error
flags:
- common
precision: 2
round: down
range: '70...100'

# flag_management:
# # this section will govern all default rules of Flags
# default_rules:
# carryforward: true
# ignore:
# - "**/*_test.ts"
# - "**/*_test.tsx"
# paths:
# - "src/**"
# statuses:
# - name_prefix: default_project
# type: project
# target: auto
# threshold: 1%
# - name_prefix: default_patch
# type: patch
# target: percent
# threshold: 80%
ignore:
- "**/*_test.ts"
- "**/*_test.tsx"
flags:
color:
paths:
- color/src/**
- '!color/src/**_test.ts'
- src/color/
common:
paths:
- src/common/
config:
paths:
- src/config/
log:
paths:
- src/log/
watch:
paths:
- src/watch/
# test:
# paths:
# - test/

parsers:
gcov:
branch_detection:
Expand Down
17 changes: 17 additions & 0 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM alpine:3.13.2 AS organizer

# Installation files
WORKDIR /out/usr/src/install
COPY src src
COPY test test
COPY mod.ts .
COPY import_map.json .
COPY trailmix.config.ts .
COPY trilom.config.ts .

FROM hayd/alpine-deno:1.8.1 AS runner
COPY --from=organizer /out /

# Install
WORKDIR /usr/src/install
ENV PATH "/root/.deno/bin:$PATH"
12 changes: 0 additions & 12 deletions .eslintrc.js

This file was deleted.

9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,16 @@ jobs:

- name: Run tests (ubuntu)
if: matrix.os == 'ubuntu-latest'
run: yarn test-coverage
run: deno test --unstable --allow-write --allow-read --allow-env --import-map=import_map.json --coverage=./coverage/output

- name: Run tests (win/mac)
if: matrix.os != 'ubuntu-latest'
run: deno test --unstable --allow-net --import-map=import_map.json
run: deno test --unstable --allow-write --allow-read --allow-env --import-map=import_map.json

- name: Generate codecov report
if: matrix.os == 'ubuntu-latest'
run: yarn coverage
run: deno coverage --unstable ./coverage --lcov > ./coverage/lcov.info

- name: Push codecov report
if: matrix.os == 'ubuntu-latest'
run: bash <(curl -s https://codecov.io/bash)
run: bash <(curl -s https://codecov.io/bash) -F color,common,config -c
16 changes: 0 additions & 16 deletions .prettierignore

This file was deleted.

38 changes: 0 additions & 38 deletions .prettierrc.js

This file was deleted.

19 changes: 14 additions & 5 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,21 @@
"version": "0.2.0",
"configurations": [
{
"name": "test: test",
"name": "Launch",
"type": "node",
"request": "launch",
"runtimeExecutable": "yarn",
"runtimeArgs": ["test-inspect"],
"attachSimplePort": 9229,
"type": "pwa-node",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "deno",
"runtimeArgs": [
"test",
"--inspect=127.0.0.1:9229",
"--unstable",
"--allow-read",
"--allow-write",
"--allow-env",
"--import-map=import_map.json"
],
"port": 9229,
"outputCapture": "std"
}
]
Expand Down
13 changes: 7 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"files.eol": "\n",
// deno
"deno.enable": true,
"deno.lint": true,
"deno.codeLens.implementations": true,
"deno.codeLens.references": true,
"deno.codeLens.referencesAllFunctions": true,
Expand All @@ -9,16 +11,15 @@
"deno.suggest.completeFunctionCalls": true,
"deno.suggest.paths": true,
"deno.importMap": "./import_map.json",
// coverage
"coverage-gutters.lcovname": "./coverage/lcov.info",
"coverage-gutters.showGutterCoverage": true,
// ui
"editor.snippetSuggestions": "inline",
"typescript.suggest.completeJSDocs": true,
// formatter
"editor.tabSize": 2,
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.organizeImports.eslint": true
},
"typescript.tsdk": "node_modules/typescript/lib"
"editor.defaultFormatter": "denoland.vscode-deno",
"debug.javascript.unmapMissingSources": true
}
14 changes: 6 additions & 8 deletions CONTRIBUTE.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# Contribute

```bash
# ensure you have extensions installed
# docker should be installed
docker build -t trailmix -f .docker/Dockerfile .

# setup env
yarn
# test all projects
yarn test
# test one project
yarn test-one color/*_test.ts
```
# now run tests
docker run trailmix deno test --unstable --allow-write --allow-read --allow-env --import-map=import_map.json
```

0 comments on commit 13ad956

Please sign in to comment.