From d3a2158d9d951ff9cb8c0a4728be1c909f6f76ad Mon Sep 17 00:00:00 2001 From: Jeff Wainwright Date: Sun, 8 Jun 2025 23:31:54 -0700 Subject: [PATCH] chore: adds initial ci --- .env.ci | 28 ++++++++++++++++++++++++++++ .github/workflows/ci.yaml | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 .env.ci create mode 100644 .github/workflows/ci.yaml diff --git a/.env.ci b/.env.ci new file mode 100644 index 0000000..6e56e86 --- /dev/null +++ b/.env.ci @@ -0,0 +1,28 @@ +DATABASE_URL=postgresql://root:root@localhost:5432/lifecycle +REDIS_URL=redis://localhost:6379 +GITHUB_WEBHOOK_SECRET='o1o1o1o1' +CODEFRESH_API_KEY='o1o1o1o1o1' +GITHUB_PRIVATE_KEY='o1o1o1o1o1' +GITHUB_APP_INSTALLATION_ID='100000' +ENVIRONMENT=dev +DEBUG=lifecycle* +APP_ENV=dev +LIFECYCLE_MODE=all +PORT=3000 +LOG_LEVEL=debug +GITHUB_APP_ID=1000 +GITHUB_CLIENT_SECRET=test-test-test +AWS_DEFAULT_REGION=us-west-2 +GITHUB_APP_NAME=test-test-test +GITHUB_CLIENT_ID=100000000000 +CODEFRESH_PIPELINE=lifecycle/lifecycle-build +TEST_REPOSITORY_NAME=test-test-test +TEST_REPOSITORY_ID=100000 +SUBNET_IDS='subnet-001, subnet-002, subnet-003' +DEFAULT_ACM_CERTIFICATE='' +DEPLOYMENT_NAMESPACE=testtesttest +API_URL='deprecated' +GOOGLE_DEPLOY_DNS_NAME='deprecated' +GOOGLE_HOST_PROJECT_ID='deprecated' +K8S_BEARER_TOKEN='deprecated' +FASTLY_TOKEN='1234' \ No newline at end of file diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..8c277ed --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,33 @@ +name: Node.js CI + +on: + pull_request: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [20.x] + + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'pnpm' + - name: Load .env file + uses: xom9ikk/dotenv@v2 + with: + mode: ci + - run: pnpm install -r --frozen-lockfile + - run: pnpm lint + # - run: pnpm ts-check need fixes + - run: pnpm test + - run: pnpm build + env: + CI: true