Skip to content

Commit

Permalink
ci: Add GitHub Action for Runner CI (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
morgsmccauley authored Aug 9, 2023
1 parent 4172d9a commit 444fba3
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 4 deletions.
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

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

0 comments on commit 444fba3

Please sign in to comment.