Merge pull request #184 from ut-code/add-npm-workspaces #336
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 | |
pull_request: | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: latest | |
cache: npm | |
- name: Install Node Packages | |
run: npm ci | |
shell: bash | |
- name: Build Packages | |
run: npm run build:packages | |
shell: bash | |
- name: Build | |
run: npm run build | |
shell: bash | |
type-check: | |
name: Type Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: latest | |
cache: npm | |
- name: Install Node Packages | |
run: npm ci | |
shell: bash | |
- name: Build Packages | |
run: npm run build:packages | |
shell: bash | |
- name: Type Check | |
run: npm run type-check | |
shell: bash | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: latest | |
cache: npm | |
- name: Install Node Packages | |
run: npm ci | |
shell: bash | |
- name: Build Packages | |
run: npm run build:packages | |
shell: bash | |
- name: Test | |
run: npm test | |
shell: bash | |
eslint: | |
name: ESLint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: latest | |
cache: npm | |
- name: Install Node Packages | |
run: npm ci | |
shell: bash | |
- name: Run ESLint | |
run: npm run lint | |
shell: bash | |
prettier: | |
name: Prettier | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: latest | |
cache: npm | |
- name: Install Node Packages | |
run: npm ci | |
shell: bash | |
- name: Prettier | |
run: npm run format:check | |
shell: bash | |
black: | |
name: Black | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
cache: pip | |
- name: Install Python Packages | |
run: pip install -r translate-backend/requirements.txt | |
shell: bash | |
- name: Black | |
run: black --check . | |
shell: bash |