Restructure pipelines and badges
- Seperate test pipeline into E2E, integration and unit test pipelines. - Improve documenetation for pipelines (ci-cd.md). - Introduce naming convention for worklow files and names. - Center badges with multiple files on README file.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
name: Quality checks
|
||||
name: quality-checks
|
||||
|
||||
on: [ push, pull_request ]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Security checks
|
||||
name: security-checks
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Deploy desktop
|
||||
name: desktop-release
|
||||
|
||||
on:
|
||||
release:
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Bump & release
|
||||
name: git-release
|
||||
|
||||
on:
|
||||
push: # Ensure a new release is created for each new tag
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Deploy site
|
||||
name: site-release
|
||||
|
||||
on:
|
||||
release:
|
||||
28
.github/workflows/tests.e2e.yaml
vendored
Normal file
28
.github/workflows/tests.e2e.yaml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
name: e2e-tests
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
run-tests:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos, ubuntu, windows]
|
||||
fail-fast: false # So it still runs on other OSes if one of them fails
|
||||
runs-on: ${{ matrix.os }}-latest
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
-
|
||||
name: Setup node
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 15.x
|
||||
-
|
||||
name: Install dependencies
|
||||
run: npm ci
|
||||
-
|
||||
name: Run e2e tests
|
||||
run: npm run test:e2e -- --headless
|
||||
@@ -1,9 +1,9 @@
|
||||
name: Test
|
||||
name: integration-tests
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
schedule: # for integration tests
|
||||
schedule: # To get notified about problems from third party dependencies
|
||||
- cron: '0 0 * * 0' # at 00:00 on every Sunday
|
||||
|
||||
jobs:
|
||||
@@ -25,13 +25,6 @@ jobs:
|
||||
-
|
||||
name: Install dependencies
|
||||
run: npm ci
|
||||
-
|
||||
name: Run unit tests
|
||||
run: npm run test:unit
|
||||
-
|
||||
name: Run integration tests
|
||||
run: npm run test:integration
|
||||
-
|
||||
name: Run e2e tests
|
||||
if: always() # Run even if previous step fail
|
||||
run: npm run test:e2e -- --headless
|
||||
28
.github/workflows/tests.unit.yaml
vendored
Normal file
28
.github/workflows/tests.unit.yaml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
name: unit-tests
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
run-tests:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos, ubuntu, windows]
|
||||
fail-fast: false # So it still runs on other OSes if one of them fails
|
||||
runs-on: ${{ matrix.os }}-latest
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
-
|
||||
name: Setup node
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 15.x
|
||||
-
|
||||
name: Install dependencies
|
||||
run: npm ci
|
||||
-
|
||||
name: Run units
|
||||
run: npm run test:unit
|
||||
96
README.md
96
README.md
@@ -2,15 +2,92 @@
|
||||
|
||||
> Enforce privacy & security best-practices on Windows and macOS, because privacy is sexy 🍑🍆
|
||||
|
||||
[](./CONTRIBUTING.md)
|
||||
[](https://lgtm.com/projects/g/undergroundwires/privacy.sexy/context:javascript)
|
||||
[](https://codeclimate.com/github/undergroundwires/privacy.sexy/maintainability)
|
||||
[](https://github.com/undergroundwires/privacy.sexy/actions)
|
||||
[](https://github.com/undergroundwires/privacy.sexy/actions)
|
||||
[](https://github.com/undergroundwires/privacy.sexy/actions)
|
||||
[](https://github.com/undergroundwires/privacy.sexy/actions)
|
||||
[](https://github.com/undergroundwires/privacy.sexy/actions)
|
||||
[](https://github.com/undergroundwires/bump-everywhere)
|
||||
<!-- markdownlint-disable MD033 -->
|
||||
<p align="center">
|
||||
<a href="https://github.com/undergroundwires/privacy.sexy/blob/master/CONTRIBUTING.md">
|
||||
<img
|
||||
alt="contributions are welcome"
|
||||
src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat"
|
||||
/>
|
||||
</a>
|
||||
<!-- Code quality -->
|
||||
<br />
|
||||
<a href="https://lgtm.com/projects/g/undergroundwires/privacy.sexy/context:javascript">
|
||||
<img
|
||||
alt="Language grade: JavaScript/TypeScript"
|
||||
src="https://img.shields.io/lgtm/grade/javascript/g/undergroundwires/privacy.sexy.svg?logo=lgtm&logoWidth=18"
|
||||
/>
|
||||
</a>
|
||||
<a href="https://codeclimate.com/github/undergroundwires/privacy.sexy/maintainability">
|
||||
<img
|
||||
alt="Maintainability"
|
||||
src="https://api.codeclimate.com/v1/badges/3a70b7ef602e2264342c/maintainability"
|
||||
/>
|
||||
</a>
|
||||
<!-- Code quality -->
|
||||
<br />
|
||||
<a href="https://github.com/undergroundwires/privacy.sexy/actions">
|
||||
<img
|
||||
alt="Unit tests status"
|
||||
src="https://github.com/undergroundwires/privacy.sexy/workflows/unit-tests/badge.svg"
|
||||
/>
|
||||
</a>
|
||||
<a href="https://github.com/undergroundwires/privacy.sexy/actions">
|
||||
<img
|
||||
alt="Integration tests status"
|
||||
src="https://github.com/undergroundwires/privacy.sexy/workflows/integration-tests/badge.svg"
|
||||
/>
|
||||
</a>
|
||||
<a href="https://github.com/undergroundwires/privacy.sexy/actions">
|
||||
<img
|
||||
alt="E2E tests status"
|
||||
src="https://github.com/undergroundwires/privacy.sexy/workflows/e2e-tests/badge.svg"
|
||||
/>
|
||||
</a>
|
||||
<!-- Checks -->
|
||||
<br />
|
||||
<a href="https://github.com/undergroundwires/privacy.sexy/actions">
|
||||
<img
|
||||
alt="Quality checks status"
|
||||
src="https://github.com/undergroundwires/privacy.sexy/workflows/quality-checks/badge.svg"
|
||||
/>
|
||||
</a>
|
||||
<a href="https://github.com/undergroundwires/privacy.sexy/actions">
|
||||
<img
|
||||
alt="Security checks status"
|
||||
src="https://github.com/undergroundwires/privacy.sexy/workflows/security-checks/badge.svg"
|
||||
/>
|
||||
</a>
|
||||
<!-- Release -->
|
||||
<br />
|
||||
<a href="https://github.com/undergroundwires/privacy.sexy/actions">
|
||||
<img
|
||||
alt="Git release status"
|
||||
src="https://github.com/undergroundwires/privacy.sexy/workflows/git-release/badge.svg"
|
||||
/>
|
||||
</a>
|
||||
<a href="https://github.com/undergroundwires/privacy.sexy/actions">
|
||||
<img
|
||||
alt="Site release status"
|
||||
src="https://github.com/undergroundwires/privacy.sexy/workflows/site-release/badge.svg"
|
||||
/>
|
||||
</a>
|
||||
<a href="https://github.com/undergroundwires/privacy.sexy/actions">
|
||||
<img
|
||||
alt="Desktop application release status"
|
||||
src="https://github.com/undergroundwires/privacy.sexy/workflows/desktop-release/badge.svg"
|
||||
/>
|
||||
</a>
|
||||
<!-- Others -->
|
||||
<br />
|
||||
<a href="https://github.com/undergroundwires/bump-everywhere">
|
||||
<img
|
||||
alt="Auto-versioned by bump-everywhere"
|
||||
src="https://github.com/undergroundwires/bump-everywhere/blob/master/badge.svg?raw=true"
|
||||
/>
|
||||
</a>
|
||||
</p>
|
||||
<!-- markdownlint-restore -->
|
||||
|
||||
## Get started
|
||||
|
||||
@@ -87,5 +164,6 @@
|
||||
- CI/CD is fully automated for this repo using different GIT events & GitHub actions.
|
||||
- Versioning, tagging, creation of `CHANGELOG.md` and releasing is automated using [bump-everywhere](https://github.com/undergroundwires/bump-everywhere) action
|
||||
- Everything that's merged in the master goes directly to production.
|
||||
- 📖 Read more on [CI/CD pipelines](./docs/ci-cd.md)
|
||||
|
||||
[](.github/workflows/)
|
||||
|
||||
19
docs/ci-cd.md
Normal file
19
docs/ci-cd.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Pipelines
|
||||
|
||||
Pipelines are found under [`.github/workflows`](./../.github/workflows).
|
||||
|
||||
## Pipeline types
|
||||
|
||||
They are categorized based on their type:
|
||||
|
||||
- `tests`: Different types of tests to verify functionality.
|
||||
- `checks`: Other controls such as vulnerability scans or styling checks.
|
||||
- `release`: Pipelines used for release of deployment such as building and testing.
|
||||
|
||||
## Naming conventions
|
||||
|
||||
Pipeline files are named using: **`<type>.<name>.yaml`**.
|
||||
|
||||
**`type`**: Sub-folders do not work for GitHub workflows so that's why `<type>.` prefix is used. See also [pipeline types](#pipeline-types).
|
||||
|
||||
**`name`**: Pipeline themselves are named using kebab case. It allows for easier URL references for their status badges. E.g. file name `tests.unit.yaml`, pipeline name: `name: unit-tests`
|
||||
Reference in New Issue
Block a user