-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from gobeam/fix/update_docs
docs: add workflow test badge in README.md and add e2e test command o…
- Loading branch information
Showing
6 changed files
with
37 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: 'Set environment variables' | ||
description: 'Configures environment variables for a workflow' | ||
inputs: | ||
varFilePath: | ||
description: 'File path to variable file or directory. Defaults to ./.github/variables/* if none specified and runs against each file in that directory.' | ||
required: false | ||
default: ./.github/variables/* | ||
runs: | ||
using: "composite" | ||
steps: | ||
- run: | | ||
sed "" ${{ inputs.varFilePath }} >> $GITHUB_ENV | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
NODE_ENV=test | ||
DB_TYPE=postgres | ||
DB_HOST=localhost | ||
DB_PORT=5432 | ||
DB_DATABASE_NAME=truthy_db | ||
DB_USERNAME=truthy_user | ||
DB_PASSWORD=truthypwd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ name: test | |
|
||
on: push | ||
|
||
jobs: | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
|
@@ -15,13 +15,16 @@ jobs: | |
POSTGRES_PASSWORD: truthypwd | ||
ports: | ||
- 5432:5432 | ||
|
||
redis: | ||
image: redis | ||
options: >- | ||
--health-cmd "redis-cli ping" | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
- 6379:6379 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
@@ -31,15 +34,10 @@ jobs: | |
with: | ||
node-version: 14.3.0 | ||
|
||
- name: Set environment variables | ||
uses: allenevans/[email protected] | ||
- name: Set Environment Variables | ||
uses: ./.github/actions/setvars | ||
with: | ||
NODE_ENV: test | ||
DATABASE_HOST: 127.0.0.1 | ||
DATABASE_PORT: ${{ job.services.postgres.ports[5432] }} | ||
DATABASE_NAME: truthy_db | ||
DATABASE_USER: truthy_user | ||
DATABASE_PASSWORD: truthypwd | ||
varFilePath: ./.github/variables/myvars.env | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
@@ -48,4 +46,7 @@ jobs: | |
run: npm run lint | ||
|
||
- name: Run unit test | ||
run: npm run test:unit | ||
run: npm run test:unit | ||
|
||
- name: Run e2e test | ||
run: npm run test:e2e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters