-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: migrate to github workflows (#2327)
* migrate to github workflows * upgrade mrlint * fix fern version * always run all tests * fix jest.config.ts compile * fix reference to fhir dir in test * update snapshots * try again * fix publish circle job dependencies * run yarn test with FERN_TOKEN
- Loading branch information
Showing
381 changed files
with
899 additions
and
356 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 |
---|---|---|
|
@@ -2,106 +2,6 @@ version: 2.1 | |
orbs: | ||
node: circleci/[email protected] | ||
jobs: | ||
check: | ||
docker: | ||
- image: cimg/node:18.8.0 | ||
resource_class: large | ||
steps: | ||
- checkout | ||
- node/install-packages: | ||
pkg-manager: yarn-berry | ||
- run: | ||
name: lint:monorepo | ||
command: yarn lint:monorepo | ||
- run: | ||
name: Check root package | ||
command: yarn root-package:check | ||
- run: | ||
name: Check dependencies | ||
command: yarn depcheck | ||
- run: | ||
name: lint:style | ||
command: yarn lint:style | ||
- run: | ||
name: fern check | ||
command: npx fern-api check | ||
- run: | ||
name: fern check test definitons | ||
command: | | ||
yarn workspace @fern-api/cli dist:cli:dev | ||
cd test-definitions | ||
node $(yarn workspace @fern-api/cli bin fern:dev) check | ||
- run: | ||
name: generate (dev) JSON Schema | ||
command: yarn generate-json-schema:dev | ||
- run: | ||
name: Format | ||
command: yarn format:check | ||
- run: | ||
name: Ensure no changes to git-tracked files | ||
command: git --no-pager diff --exit-code | ||
|
||
eslint: | ||
docker: | ||
- image: cimg/node:18.8.0 | ||
resource_class: large | ||
steps: | ||
- checkout | ||
- node/install-packages: | ||
pkg-manager: yarn-berry | ||
- run: | ||
# compilation is needed for some typescript-eslint rules | ||
name: compile | ||
command: yarn compile | ||
- run: | ||
name: lint:eslint | ||
command: yarn lint:eslint | ||
|
||
compile: | ||
docker: | ||
- image: cimg/node:18.8.0 | ||
resource_class: large | ||
steps: | ||
- checkout | ||
- node/install-packages: | ||
pkg-manager: yarn-berry | ||
- run: | ||
name: compile | ||
command: yarn compile | ||
|
||
test: | ||
# this is machine because of the docker-utils tests | ||
machine: | ||
image: ubuntu-2004:current | ||
steps: | ||
- checkout | ||
- node/install-packages: | ||
pkg-manager: yarn-berry | ||
- run: | ||
name: Run tests | ||
command: yarn test --ci | ||
- run: | ||
name: Ensure no changes to git-tracked files | ||
command: git --no-pager diff --exit-code | ||
|
||
ete-tests: | ||
# this is machine because of the local generation tests | ||
machine: | ||
image: ubuntu-2004:current | ||
steps: | ||
- checkout | ||
- node/install-packages: | ||
pkg-manager: yarn-berry | ||
- run: | ||
name: Run ETE tests | ||
command: | | ||
echo 'export FERN_TOKEN="$FERN_ORG_TOKEN_DEV"' >> $BASH_ENV | ||
source "$BASH_ENV" | ||
yarn test:ete | ||
- run: | ||
name: Ensure no changes to git-tracked files | ||
command: git --no-pager diff --exit-code | ||
|
||
live-test-dev: | ||
docker: | ||
- image: cimg/node:18.8.0 | ||
|
@@ -242,54 +142,10 @@ jobs: | |
export FERN_TOKEN="$FERN_ORG_TOKEN_PROD" | ||
npx fern-api generate --api ir-types-v31 --group sdks | ||
check-cli-release-is-allowed: | ||
docker: | ||
- image: cimg/node:18.8.0 | ||
steps: | ||
- checkout | ||
- node/install-packages: | ||
pkg-manager: yarn-berry | ||
- run: | ||
name: Check release blockers | ||
command: yarn check-cli-release-blockers | ||
- run: | ||
name: Ensure JSON schema is up to date | ||
command: | | ||
yarn generate-json-schema | ||
git --no-pager diff --exit-code | ||
workflows: | ||
version: 2 | ||
build: | ||
jobs: | ||
- check: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
|
||
- eslint: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
|
||
- compile: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
|
||
- test: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
|
||
- ete-tests: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
context: | ||
- auth0-dev | ||
- fern-tokens | ||
|
||
- live-test-dev: | ||
filters: | ||
tags: | ||
|
@@ -313,12 +169,6 @@ workflows: | |
filters: | ||
branches: | ||
only: main | ||
requires: | ||
- check | ||
- compile | ||
- eslint | ||
- test | ||
- ete-tests | ||
context: | ||
- npm | ||
- auth0-dev | ||
|
@@ -330,11 +180,6 @@ workflows: | |
tags: | ||
only: /^([0-9]+)\.([0-9]+)\.([0-9]+)-rc([0-9]+)$/ | ||
requires: | ||
- check | ||
- compile | ||
- eslint | ||
- test | ||
- ete-tests | ||
- live-test-dev | ||
context: | ||
- npm | ||
|
@@ -348,12 +193,6 @@ workflows: | |
tags: | ||
only: /^([0-9]+)\.([0-9]+)\.([0-9]+)$/ | ||
requires: | ||
- check-cli-release-is-allowed | ||
- check | ||
- compile | ||
- eslint | ||
- test | ||
- ete-tests | ||
- live-test-dev | ||
- live-test | ||
context: | ||
|
@@ -368,18 +207,6 @@ workflows: | |
tags: | ||
only: /.*/ | ||
requires: | ||
- check | ||
- compile | ||
- eslint | ||
- test | ||
- ete-tests | ||
- live-test-dev | ||
context: | ||
- fern-tokens | ||
|
||
- check-cli-release-is-allowed: | ||
filters: | ||
branches: | ||
ignore: /.*/ | ||
tags: | ||
only: /^([0-9]+)\.([0-9]+)\.([0-9]+)$/ |
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,98 @@ | ||
name: ci | ||
on: [push] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: "yarn" | ||
|
||
- name: Install | ||
run: yarn install | ||
|
||
- name: Lint Monorepo | ||
run: yarn lint:monorepo | ||
|
||
- name: Check dependencies | ||
run: yarn depcheck | ||
|
||
- name: Lint | ||
run: yarn lint:style | ||
|
||
- name: generate (dev) JSON Schema | ||
run: yarn generate-json-schema:dev | ||
|
||
- name: Format | ||
run: yarn format:check | ||
|
||
- name: Ensure no changes to git-tracked files | ||
run: git --no-pager diff --exit-code | ||
|
||
compile: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: "yarn" | ||
|
||
- name: Install | ||
run: yarn install | ||
|
||
- name: compile | ||
run: yarn compile | ||
|
||
- name: lint:eslint | ||
run: yarn lint:eslint | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: "yarn" | ||
|
||
- name: Install | ||
run: yarn install | ||
|
||
- name: Run tests | ||
run: yarn test --ci | ||
|
||
- name: Ensure no changes to git-tracked files | ||
run: git --no-pager diff --exit-code | ||
|
||
ete-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: "yarn" | ||
|
||
- name: Install | ||
run: yarn install | ||
|
||
- name: Run ETE tests | ||
env: | ||
FERN_ORG_TOKEN_DEV: ${{ secrets.FERN_ORG_TOKEN_DEV }} | ||
run: | | ||
FERN_TOKEN=${{ secrets.FERN_ORG_TOKEN_DEV }} yarn test:ete | ||
- name: Ensure no changes to git-tracked files | ||
run: git --no-pager diff --exit-code |
22 changes: 15 additions & 7 deletions
22
.github/workflows/test-definitions.yml → .github/workflows/fern.yml
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.