Touch tutorial #351
Workflow file for this run
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 | |
with: | |
fetch-depth: 0 | |
- 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 | |
run: | | |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then | |
npx lerna run build --since=origin/${{ github.base_ref }} | |
else | |
npx lerna run build | |
fi | |
shell: bash | |
type-check: | |
name: Type Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- 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: Type Check | |
run: | | |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then | |
npx lerna run type-check --since=origin/${{ github.base_ref }} | |
else | |
npx lerna run type-check | |
fi | |
shell: bash | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- 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: Test | |
run: | | |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then | |
npx lerna run test --since=origin/${{ github.base_ref }} | |
else | |
npx lerna run test | |
fi | |
shell: bash | |
eslint: | |
name: ESLint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- 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: | | |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then | |
npx lerna run lint --since=origin/${{ github.base_ref }} | |
else | |
npx lerna run lint | |
fi | |
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 |