Skip to content

Commit db7c05e

Browse files
authored
Merge pull request #604 from Authenticator-Extension/dev
2 parents 57bedac + f6f834d commit db7c05e

File tree

131 files changed

+9289
-2682
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+9289
-2682
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,7 @@ chrome
55
scripts
66
webpack.config.js
77
webpack.prod.js
8+
webpack.dev.js
9+
webpack.watch.js
810
src/test
911
src/models/credentials.ts

.eslintrc.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module.exports = {
22
root: true,
33
parser: '@typescript-eslint/parser',
44
parserOptions: {
5-
"ecmaVersion": 6
5+
"ecmaVersion": 6
66
},
77
plugins: [
88
'@typescript-eslint',
@@ -14,10 +14,10 @@ module.exports = {
1414
],
1515
env: {
1616
"amd": true,
17-
"node": true
17+
"node": true,
1818
},
1919
rules: {
2020
"@typescript-eslint/no-use-before-define": "off",
21-
"@typescript-eslint/explicit-function-return-type": "off"
21+
"@typescript-eslint/explicit-function-return-type": "off",
2222
}
2323
};

.gitattributes

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
*.js linguist-vendored
2-
css/font-awesome.css linguist-vendored
3-
js/jsqrcode/index.d.ts linguist-vendored
2+
*.css linguist-vendored
43
_locales/* linguist-generated=true
54
_locales/en/messages.json linguist-generated=false

.github/workflows/i18n.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: i18n
2+
3+
on:
4+
push:
5+
branches: [ dev ]
6+
7+
jobs:
8+
i18n-strings:
9+
runs-on: ubuntu-latest
10+
name: Process new i18n strings
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- run: bash scripts/i18n.sh
16+
env:
17+
DEPLOY_KEY_PASSWORD: ${{ secrets.DEPLOY_KEY_PASSWORD }}

.github/workflows/main.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
style:
7+
runs-on: ubuntu-latest
8+
name: Style checks
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
- name: Setup Node.js environment
14+
uses: actions/[email protected]
15+
16+
- name: Install dependencies
17+
run: |
18+
npm i prettier
19+
sudo npm i -g lintspaces-cli
20+
21+
- name: Prettier
22+
run: ./node_modules/prettier/bin-prettier.js --check ./src/* ./src/**/* ./src/**/**/* ./sass/*.scss
23+
24+
- name: lintspaces
25+
run: |
26+
lintspaces -nt -d 'spaces' -i 'js-comments' src/*/* src/*.ts view/* manifest-*.json css/popup.css css/import.css
27+
build:
28+
runs-on: ubuntu-latest
29+
name: Build ${{ matrix.platform }}
30+
31+
strategy:
32+
matrix:
33+
platform: ["chrome", "firefox"]
34+
35+
steps:
36+
- uses: actions/checkout@v2
37+
38+
- name: Setup Node.js environment
39+
uses: actions/[email protected]
40+
41+
- name: Install dependencies
42+
run: npm ci
43+
44+
- name: Build
45+
run: npm run ${{ matrix.platform }}
46+
run-tests:
47+
runs-on: ubuntu-latest
48+
name: Run tests
49+
needs: [ build ]
50+
51+
steps:
52+
- uses: actions/checkout@v2
53+
54+
- name: Setup Node.js environment
55+
uses: actions/[email protected]
56+
57+
- name: Install dependencies
58+
run: npm ci
59+
env:
60+
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 'true'
61+
62+
- name: Test code
63+
uses: mujo-code/puppeteer-headful@master
64+
with:
65+
args: npm test
66+
67+
- name: Codecov
68+
uses: codecov/[email protected]

.github/workflows/release.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
name: Publish release build
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Setup Node.js environment
17+
uses: actions/[email protected]
18+
19+
- name: Install dependencies
20+
run: npm ci
21+
22+
- name: Build
23+
run: bash scripts/release.sh
24+
env:
25+
CREDS_FILE_PASSWORD: ${{ secrets.CREDS_FILE_PASSWORD }}
26+
27+
- name: Create a release
28+
id: create_release
29+
uses: actions/[email protected]
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
with:
33+
tag_name: ${{ github.ref }}
34+
release_name: Release ${{ github.ref }}
35+
draft: false
36+
prerelease: false
37+
- name: Upload Release Asset
38+
id: upload-release-asset
39+
uses: actions/upload-release-asset@v1
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
with:
43+
upload_url: ${{ steps.create_release.outputs.upload_url }}
44+
asset_path: ./release.tar.gz
45+
asset_name: release.tar.gz
46+
asset_content_type: application/gzip

.github/workflows/tagging.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Tagging
2+
3+
on:
4+
push:
5+
branches: [ release ]
6+
7+
jobs:
8+
tagging:
9+
runs-on: ubuntu-latest
10+
name: Release tagging
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- run: bash scripts/tag.sh
16+
env:
17+
DEPLOY_KEY_PASSWORD: ${{ secrets.DEPLOY_KEY_PASSWORD }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ cert.pfx
1111
css
1212
.license-gen-tmp
1313
view/licenses.html
14+
./test
15+
scripts/authenticator-build-key
16+
scripts/test-runner.js

.travis.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Authenticator [![Build Status](https://travis-ci.com/Authenticator-Extension/Authenticator.svg?branch=dev)](https://travis-ci.com/Authenticator-Extension/Authenticator) [![Crowdin](https://d322cqt584bo4o.cloudfront.net/authenticator-firefox/localized.svg)](https://crowdin.com/project/authenticator-firefox) <img align="right" width="100" height="100" src="https://github.com/Authenticator-Extension/Authenticator/raw/dev/images/icon128.png">
1+
# Authenticator [![Build Status](https://travis-ci.com/Authenticator-Extension/Authenticator.svg?branch=dev)](https://travis-ci.com/Authenticator-Extension/Authenticator) [![Crowdin](https://d322cqt584bo4o.cloudfront.net/authenticator-firefox/localized.svg)](https://crowdin.com/project/authenticator-firefox) <img align="right" width="100" height="100" src="https://github.com/Authenticator-Extension/Authenticator/raw/dev/images/icon.svg">
22

33
> Authenticator generates 2-Step Verification codes in your browser.
44
@@ -15,4 +15,14 @@ npm install
1515
npm run [chrome, firefox]
1616
```
1717

18+
## Development (Chrome)
19+
20+
``` bash
21+
# install development dependencies
22+
npm install
23+
# compiles the Chrome extension to the `./test/chrome` directory
24+
npm run dev:chrome
25+
# load the unpacked extension from the `./test/chrome/ directory in Chrome
26+
```
27+
1828
Note that Windows users should download a tool like [Git Bash](https://git-scm.com/download/win) or [Cygwin](http://cygwin.com/) to build.

0 commit comments

Comments
 (0)