Add CI - Run Tests (v4)

This makes it so that on every push (includes PRs), dependencies and tests run on GitHub Actions.

It also adds a small badge reporting the latest push/run on the `v4` branch.

Fixes #321
This commit is contained in:
Bruno Bernardino 2021-12-15 15:07:38 +00:00
parent 433f979898
commit 1e9db8028c
No known key found for this signature in database
GPG Key ID: D1B0A69ADD114ECE
4 changed files with 20 additions and 2 deletions

16
.github/workflows/run-tests.yml vendored Normal file
View File

@ -0,0 +1,16 @@
name: Run Tests
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test

View File

@ -1,5 +1,7 @@
# Padloc
[![](https://github.com/padloc/padloc/workflows/Run%20Tests/badge.svg?branch=v4)](https://github.com/padloc/padloc/actions?workflow=Run+Tests)
Simple, secure password and data management for individuals and teams (formerly known as Padlock).
This repo is split into multiple packages:

View File

@ -30,4 +30,4 @@
"test": "lerna run test",
"locale:extract": "lerna run extract --scope '@padloc/locale'"
}
}
}

View File

@ -35,6 +35,6 @@ suite("Account", () => {
await account.unlock(password);
assert.equal(bytesToHex(publicKey), bytesToHex(account.publicKey));
assert.equal(bytesToHex(privateKey), bytesToHex(account.privateKey));
assert.equal(bytesToHex(privateKey as Uint8Array), bytesToHex(account.privateKey as Uint8Array));
});
});