Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Add GitHub Action for Runner CI #175

Merged
merged 2 commits into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/workflows/runner-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Runner CI
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of duplication, but it means they all run in parallel, and each job is shown in the main PR page
image


on:
pull_request:
paths:
- "runner/**"

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18.x'

- name: Install Node Dependencies
run: npm install
working-directory: ./runner

- name: Test
run: npm test
working-directory: ./runner
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18.x'

- name: Install Node Dependencies
run: npm install
working-directory: ./runner

- name: Lint
run: npm run lint
working-directory: ./runner
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18.x'

- name: Install Node Dependencies
run: npm install
working-directory: ./runner

- name: Build
run: npm run build
working-directory: ./runner
8 changes: 4 additions & 4 deletions runner/src/hasura-client/hasura-client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ describe('HasuraClient', () => {

const HASURA_ENDPOINT = 'mock-hasura-endpoint';
const HASURA_ADMIN_SECRET = 'mock-hasura-admin-secret';
const PG_HOST = 'localhost';
const PG_PORT = '5432';
const PGHOST = 'localhost';
const PGPORT = '5432';

beforeAll(() => {
process.env = {
...oldEnv,
HASURA_ENDPOINT,
HASURA_ADMIN_SECRET,
PG_HOST,
PG_PORT,
PGHOST,
PGPORT,
};
});

Expand Down