1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-30 13:03:53 +01:00
bitwarden-browser/.github/workflows/build.yml

62 lines
1.2 KiB
YAML
Raw Normal View History

2020-07-23 23:02:59 +02:00
name: Build
on: push
jobs:
cloc:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Set up cloc
run: |
sudo apt-get update
sudo apt-get -y install cloc
- name: Print lines of code
run: cloc --include-lang TypeScript,JavaScript,HTML,Sass,CSS --vcs git
build:
2020-07-23 23:13:57 +02:00
runs-on: ${{ matrix.os }}
strategy:
matrix:
2020-07-24 15:49:59 +02:00
os: [windows-latest, macos-latest, ubuntu-latest]
2020-07-23 23:02:59 +02:00
steps:
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: '10.x'
- name: Print environment
run: |
node --version
npm --version
- name: Checkout repo
uses: actions/checkout@v2
- name: Install Node dependencies
run: npm install
- name: Run linter
run: npm run lint
- name: Build
run: npm run build
- name: Run tests
2020-07-24 15:49:59 +02:00
if: runner.os != 'Linux'
2020-07-23 23:02:59 +02:00
run: npm run test
2020-07-23 23:13:57 +02:00
- name: Upload test coverage artifact
2020-07-24 15:49:59 +02:00
if: runner.os != 'Linux'
2020-07-23 23:02:59 +02:00
uses: actions/upload-artifact@v2-preview
with:
name: test-coverage
path: coverage/