Skip to content

Commit

Permalink
Linux package installation in README.
Browse files Browse the repository at this point in the history
  • Loading branch information
qa-swaneet-sahoo committed Apr 26, 2022
1 parent 7e938f2 commit c9fd2d5
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 10 deletions.
25 changes: 21 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,34 @@ human-readable text formats.
`protocurl` includes and uses a bundled `protoc` by default. It is recommended to install `curl` into PATH for
configurable http requests. Otherwise `protocurl` will use a simple non-configurable fallback http implementation.

#### Native CLI
### Native CLI

**Archive**

1. Download the latest release archive for your platform from https://github.com/qaware/protocurl/releases
2. Extract the archive into a folder, e.g. `/opt/protocurl`.
3. Add symlink to the binary in the folder. e.g. `ln -s /opt/protocurl/bin/protocurl /usr/bin/protocurl`
Or add the binary folder `/opt/protocurl/bin` to your system-wide path.
4. Test that it works via `protocurl -h`
4. Test it via `protocurl -h`

**Debian .deb package**

1. Download the latest release `.deb` for your architecture from https://github.com/qaware/protocurl/releases
2. Install dependency curl: `sudo apt install curl`
3. Install `sudo dpkg -i <downloaded-release>.deb`
4. Test it via `protocurl -h`

**Alpine .apt package**

1. Download the latest release `.apk` for your architecture from https://github.com/qaware/protocurl/releases
2. Install dependencies curl and gcompat: `sudo apk add curl gcompat`
3. Install `sudo apk add --alow-untrusted <downloaded-release>.apk`
4. Test it via `protocurl -h`

#### Docker
### Docker

Simply run `docker run -v "/path/to/proto/files:/proto" qaware/protocurl <args>`. See [Quick Start](#quick-start) for how to use.
Simply run `docker run -v "/path/to/proto/files:/proto" qaware/protocurl <args>`. See [Quick Start](#quick-start) for
how to use.

## Quick Start

Expand Down
11 changes: 9 additions & 2 deletions TESTS.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# Tests

There are two tests. The docker-containerized tests and multi-platform native tests (running on windows, macos, etc.).
There are three types of tests. The docker-containerized tests, multi-platform native archive tests (running on windows,
macos, etc.)
and multi-platform native package tests.

The containerized tests do much of the heavy lifting in ensuring correctness - whereas the native tests ensure that the
basic functionality work multi-platform and contains regression tests for OS-specific behavior.

The native tests extract the release archive and the release packages (e.g. .deb, .apk) and run basic tests.

## Containerized Tests

The tests are run automatically via GitHub Actions [here](.github/workflows/test.yml). Run them
Expand Down Expand Up @@ -90,7 +95,9 @@ jobs are named `post-release-test-<OS>`. After setting up the machine, they star
via [test/servers/native-start-server.ps1](test/servers/native-start-server.ps1) and run the tests.

The output is not tested rigorously like the containerized tests. Only the successful exit is tested implicitly as the
Powershell is set to stop on the first error via `$ErrorActionPreference = "Stop"`.
Powershell is set to stop on the first error via `$ErrorActionPreference = "Stop"` and `$LASTEXITCODE`.

On linux the release packages are tested inside a container.

## Example Containerized Tests

Expand Down
25 changes: 21 additions & 4 deletions doc/template.README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,34 @@ human-readable text formats.
`protocurl` includes and uses a bundled `protoc` by default. It is recommended to install `curl` into PATH for
configurable http requests. Otherwise `protocurl` will use a simple non-configurable fallback http implementation.

#### Native CLI
### Native CLI

**Archive**

1. Download the latest release archive for your platform from https://github.com/qaware/protocurl/releases
2. Extract the archive into a folder, e.g. `/opt/protocurl`.
3. Add symlink to the binary in the folder. e.g. `ln -s /opt/protocurl/bin/protocurl /usr/bin/protocurl`
Or add the binary folder `/opt/protocurl/bin` to your system-wide path.
4. Test that it works via `protocurl -h`
4. Test it via `protocurl -h`

**Debian .deb package**

1. Download the latest release `.deb` for your architecture from https://github.com/qaware/protocurl/releases
2. Install dependency curl: `sudo apt install curl`
3. Install `sudo dpkg -i <downloaded-release>.deb`
4. Test it via `protocurl -h`

**Alpine .apt package**

1. Download the latest release `.apk` for your architecture from https://github.com/qaware/protocurl/releases
2. Install dependencies curl and gcompat: `sudo apk add curl gcompat`
3. Install `sudo apk add --alow-untrusted <downloaded-release>.apk`
4. Test it via `protocurl -h`

#### Docker
### Docker

Simply run `docker run -v "/path/to/proto/files:/proto" qaware/protocurl <args>`. See [Quick Start](#quick-start) for how to use.
Simply run `docker run -v "/path/to/proto/files:/proto" qaware/protocurl <args>`. See [Quick Start](#quick-start) for
how to use.

## Quick Start

Expand Down

0 comments on commit c9fd2d5

Please sign in to comment.