Skip to content

Commit

Permalink
Update to use latest toolchain
Browse files Browse the repository at this point in the history
Thanks to @elsehow for testing (incl. adding tests)!
  • Loading branch information
nhynes committed Apr 22, 2020
1 parent 7f52a48 commit 45418c7
Show file tree
Hide file tree
Showing 22 changed files with 6,385 additions and 161 deletions.
45 changes: 45 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
module.exports = {
env: {
browser: true,
es6: true,
node: true,
},
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'prettier/@typescript-eslint',
],
rules: {
// allow interop with js
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-ts-ignore': 'warn',

// allow types to be declared anywhere in module
'@typescript-eslint/no-use-before-define': 'off',

// allow implicit void return
'@typescript-eslint/explicit-function-return-type': 'off',

// allow unwrapping
'@typescript-eslint/no-non-null-assertion': 'off',

// Disallow `throw "string"`, require `throw new Error(...)`.
'no-throw-literal': 'error',

// Enforce use of === instead of ==
eqeqeq: ['error', 'smart'],

// unused vars is just asking for bugs
'@typescript-eslint/no-unused-vars': [
'error',
{
varsIgnorePattern: '_.*',
argsIgnorePattern: '_.*',
},
],
},
};
25 changes: 16 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,26 @@ on: [push]

jobs:
build-test:
runs-on: ubuntu-18.04

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2

- uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install Oasis
run: curl --proto '=https' --tlsv1.2 -sSL https://get.oasis.dev | python - --speedrun
- name: Build and test service

- name: Install Oasis SDK
run: |
curl --proto '=https' --tlsv1.2 -sSL https://get.oasis.dev | python - --speedrun
echo "::set-env name=PATH::$HOME/.local/bin::$HOME/.cargo/bin:$PATH"
- name: Lint
run: |
cargo fmt -- --check
yarn
yarn lint
- name: Test
run: |
export PATH=~/.local/bin:-~/.cargo/bin:$PATH
export LD_LIBRARY_PATH=$(rustc --print sysroot)/lib:$LD_LIBRARY_PATH
oasis build
oasis chain >& oasis.log &
oasis test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
dist/
node_modules/
target/
.oasis/
File renamed without changes.
Loading

0 comments on commit 45418c7

Please sign in to comment.