Skip to content

Commit

Permalink
feat(all): switch to ES module
Browse files Browse the repository at this point in the history
  • Loading branch information
jost-s committed Jun 6, 2022
1 parent d30abda commit 8eae13a
Show file tree
Hide file tree
Showing 47 changed files with 2,160 additions and 2,065 deletions.
18 changes: 18 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
root: true,
env: {
es2021: true,
node: true,
},
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
plugins: ["@typescript-eslint", "eslint-plugin-tsdoc", "prettier"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
],
};
25 changes: 0 additions & 25 deletions .eslintrc.js

This file was deleted.

80 changes: 43 additions & 37 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,48 @@
name: Test

on:
pull_request:
push:
branches:
- 'develop'
pull_request:
push:
branches:
- "develop"

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [
ubuntu-latest,
# macos-latest re-enable later, too slow.
]
node: [ 16.x ] # '10', '12', '14' to speed up CI for now
steps:
- name: Fetch source code
uses: actions/checkout@v2
- name: Use Nix
uses: cachix/install-nix-action@v16
with:
nix_path: nixpkgs=channel:nixos-21.11
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Configure Nix substituters
run: |
set -xe
mkdir -p ~/.config/nix/
cp ./.github/nix.conf ~/.config/nix/
- name: Use cachix
uses: cachix/cachix-action@v10
with:
name: holochain-ci
- name: Prepare Nix environment
run: nix-shell --command "echo Completed"
- name: Run all tests
run: nix-shell --run './run-test.sh'
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
node: [14.x, 16.x]

steps:
- name: Check out source code
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- name: Install nix
uses: cachix/install-nix-action@v16
with:
nix_path: nixpkgs=channel:nixos-21.11

- name: Set up cachix
uses: cachix/cachix-action@v10
with:
name: holochain-ci

- name: Cache test zome build
uses: actions/cache@v3
env:
cache-name: cache-test-zome
with:
path: |
.cargo
target
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('Cargo.lock') }}
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('Cargo.lock') }}

- name: Run all tests
run: nix-shell --run './run-test.sh'
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.vscode
.cargo
target
node_modules
/lib
.tsbuildinfo
/lib.es
/lib.es
.tsbuildinfo
Loading

0 comments on commit 8eae13a

Please sign in to comment.