FAI-14503: Batch Hermes GraphQL queries #6465
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
name: CI | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- '**.md' | |
workflow_dispatch: | |
jobs: | |
connector-acceptance-test: | |
if: ${{ github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' }} # Skip PRs | |
name: Connector Acceptance Test | |
runs-on: ubuntu-latest | |
timeout-minutes: 45 | |
env: | |
FORCE_COLOR: true | |
steps: | |
- name: Check out | |
uses: actions/checkout@v4 | |
- name: Run Jenkins server | |
run: | | |
mkdir -p ${{ github.workspace }}/sources/jenkins-source/test_files/jenkins/data/secrets/ | |
docker run -d -u 0 -i --name jenkins -p 8080:8080 -p 50000:50000 -v ${{ github.workspace }}/sources/jenkins-source/test_files/jenkins/data:/var/jenkins_home jenkins/jenkins:lts-jdk11 | |
echo "Waiting until Jenkins is up" | |
waiting=0 | |
until curl -s -I -X GET http://127.0.0.1:8080; do | |
docker ps -a | |
let waiting+=3 | |
sleep 3 | |
if [ $waiting -eq 120 ]; then | |
echo "Jenkins server did not respond within 120 seconds" | |
exit 42 | |
fi | |
done | |
sudo chown -R $USER:$USER ${{ github.workspace }}/sources/jenkins-source/test_files/jenkins/data | |
- name: Source Acceptance Test | |
run: ./scripts/source-acceptance-test.sh example-source | |
- name: Stop Jenkins server | |
if: ${{ github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' }} # Skip PRs | |
run: | | |
docker stop jenkins | |
docker rm jenkins | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
env: | |
FORCE_COLOR: true | |
HUSKY_SKIP_INSTALL: 1 | |
HUSKY_SKIP_HOOKS: 1 | |
HUSKY: 0 | |
steps: | |
- name: Check out | |
uses: actions/checkout@v4 | |
- name: Cache Node modules | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-node-modules | |
with: | |
# npm cache files are stored in `~/.npm` on Linux/macOS | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Cache Turbo build setup | |
uses: actions/cache@v4 | |
with: | |
path: .turbo | |
key: ${{ runner.os }}-turbo-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-turbo- | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
- name: Install Turborepo | |
run: npm install turbo --global | |
- name: Install dependencies | |
run: npm ci --prefer-offline --no-audit --no-fund | |
- name: Test | |
env: | |
NODE_OPTIONS: '--max-old-space-size=4096' | |
run: turbo test-cov | |
test-packaging: | |
if: ${{ github.ref != 'refs/heads/main' && github.event_name != 'workflow_dispatch' }} # Only on PRs | |
name: Packaging Test | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
env: | |
FORCE_COLOR: true | |
HUSKY_SKIP_INSTALL: 1 | |
HUSKY_SKIP_HOOKS: 1 | |
HUSKY: 0 | |
steps: | |
- name: Check out | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
registry-url: https://registry.npmjs.org | |
- name: Cache Turbo build setup | |
uses: actions/cache@v4 | |
with: | |
path: .turbo | |
key: ${{ runner.os }}-turbo-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-turbo- | |
- name: Install Turborepo | |
run: npm install turbo --global | |
- name: Install dependencies | |
run: npm ci --prefer-offline --no-audit --no-fund | |
- name: Build packages | |
run: turbo build | |
- name: Test Airbyte CDK package | |
run: | | |
cd faros-airbyte-cdk && \ | |
npm publish --dry-run | |
- name: Test Airbyte Common package | |
run: | | |
cd faros-airbyte-common && \ | |
npm publish --dry-run | |
- name: Test Faros Destination package | |
run: | | |
cd destinations/airbyte-faros-destination && \ | |
npm publish --dry-run |