Skip to content

Commit

Permalink
#204 add e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joepio committed Mar 12, 2022
1 parent 54da415 commit 6ecba1d
Show file tree
Hide file tree
Showing 4 changed files with 446 additions and 47 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,27 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: clippy

e2e:
name: End-to-end tests
runs-on: ubuntu-latest
steps:
- run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0 libappindicator3-dev
- uses: actions/setup-node@v2
with:
# Required by playwright
node-version: "14"
- uses: bahmutov/npm-install@v1
- run: npx playwright install-deps
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Rust Cache
uses: Swatinem/[email protected]
- run: nohup cargo run
- run: npx playwright e2e.spec.js
18 changes: 12 additions & 6 deletions CONTRIBUTE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ If you want to share some thoughts on the Atomic Data _specification_, please [d
- [Criterion benchmarks](#criterion-benchmarks)
- [Drill](#drill)
- [CI, Versioning and Tagging](#ci-versioning-and-tagging)
- [Doing the CI's work](#doing-the-cis-work)
- [Including JS app_assets](#including-js-app_assets)
- [Publishing manually - doing the CI's work](#publishing-manually---doing-the-cis-work)
- [Building and publishing binaries](#building-and-publishing-binaries)
- [Publishing to Cargo](#publishing-to-cargo)
- [Publishing server to Docker](#publishing-server-to-docker)
Expand Down Expand Up @@ -98,16 +99,21 @@ drill -b benchmark.yml --stats
- We use [semver](https://semver.org/), and are still quite far from 1.0.0.
- The version for `atomic-lib` is the most important, and dictates the versions of `cli` and `server`. When `lib` changes minor version, `cli` and `server` should follow.

## Doing the CI's work
## Including JS app_assets

Before tagging a new version, make sure to update the `app_assets` folder:

1. get [atomic-data-browser](https://github.com/joepio/atomic-data-browser) locally
2. run `yarn build`
3. copy the contents of `publish` to `app_assets`
4. search and replace `./workbox` with `./app_assets/workbox` in `sw.js`, because we'll host `sw.js` from root.

## Publishing manually - doing the CI's work

If the CI scripts for some reason do not do their job (buildin releases, docker file, publishing to cargo), you can follow these instructions:

### Building and publishing binaries

1. Make sure to update the `app_assets` folder:
1. get [atomic-data-browser](https://github.com/joepio/atomic-data-browser) locally
2. run `yarn build`
3. copy the contents of `publish` to `app_assets`
2. `cargo build --release`
3. `cargo build --release --features desktop` if you want the tray item (mac + win support)
4. Create a release on github, add the binaries.
Expand Down
Loading

0 comments on commit 6ecba1d

Please sign in to comment.