Skip to content

Commit

Permalink
ci(api): run lints for every module
Browse files Browse the repository at this point in the history
  • Loading branch information
ayuhito committed Dec 15, 2023
1 parent 3c3201b commit f94565c
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 3 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/tests-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,33 @@ jobs:
- name: Run tests
run: pnpm run coverage

cdn:
runs-on: ubuntu-latest
defaults:
run:
working-directory: api/cdn

steps:
- uses: actions/checkout@v3

- name: Enable PNPM
uses: pnpm/action-setup@v2

- name: Set node version to 20
uses: actions/setup-node@v3
with:
node-version: "20"
cache: "pnpm"

- name: Install
run: pnpm install

- name: Run lints
run: pnpm run ci:lint

## - name: Run tests
## run: pnpm run coverage

upload:
runs-on: ubuntu-latest
defaults:
Expand All @@ -64,3 +91,27 @@ jobs:

- name: Run tests
run: pnpm run coverage

download:
runs-on: ubuntu-latest
defaults:
run:
working-directory: api/download

steps:
- uses: actions/checkout@v3

- name: Enable PNPM
uses: pnpm/action-setup@v2

- name: Set node version to 20
uses: actions/setup-node@v3
with:
node-version: "20"
cache: "pnpm"

- name: Install
run: pnpm install

- name: Run lints
run: pnpm run ci:lint
6 changes: 3 additions & 3 deletions api/download/src/download.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { info, error as errorDiary } from 'diary';
import { error as errorDiary, info } from 'diary';
import { zipSync } from 'fflate';
import { StatusError } from 'itty-router';
import PQueue from 'p-queue';
// @ts-expect-error - no types
Expand All @@ -18,7 +19,6 @@ import {
} from './manifest';
import { keepAwake, SLEEP_MINUTES } from './sleep';
import { type IDResponse } from './types';
import { zipSync } from 'fflate';

export const downloadFile = async (manifest: Manifest) => {
const { id, subset, weight, style, extension, version, url } = manifest;
Expand Down Expand Up @@ -176,7 +176,7 @@ export const generateZip = async (
}

const licenseBuffer = await license.arrayBuffer();
files['LICENSE'] = new Uint8Array(licenseBuffer);
files.LICENSE = new Uint8Array(licenseBuffer);

info(`Generating zip file for ${id}@${version}`);

Expand Down

0 comments on commit f94565c

Please sign in to comment.