From f5a363cda9cc2ec73ba157ad2853b44a5a057c4a Mon Sep 17 00:00:00 2001 From: Julien Date: Sun, 28 May 2023 03:48:33 +0200 Subject: [PATCH] ci: add base CI as a Github action --- .github/workflows/ci.yml | 44 +++++++++++++++++++++++ package.json | 1 + pnpm-lock.yaml | 78 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 123 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..be90b955 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,44 @@ +name: Build and test + +on: [push, pull_request] + +env: + NODE_VERSION: 16 + PNPM_VERSION: 8 + +jobs: + test: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 2 + + - name: Setup Pnpm + uses: pnpm/action-setup@v2 + with: + version: ${{ env.PNPM_VERSION }} + + - name: Setup Node.js environment + uses: actions/setup-node@v3 + with: + node-version: ${{ env.NODE_VERSION }} + cache: 'pnpm' + cache-dependency-path: '**/pnpm-lock.yaml' + + - name: Install dependencies + run: pnpm install + + - name: Lint + run: pnpm lint + + - name: Types check + run: pnpm types-check + + - name: Build + run: pnpm build + + - name: Test + run: pnpm test diff --git a/package.json b/package.json index 7263b261..d622b69b 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "plop": "^3.0.5", "prettier": "^2.5.1", "rimraf": "^3.0.2", + "turbo": "^1.9.9", "version-bump-prompt": "^6.1.0", "zx": "^7.2.2" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 82b9b027..db6c59f4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,6 +16,9 @@ importers: rimraf: specifier: ^3.0.2 version: registry.npmjs.org/rimraf@3.0.2 + turbo: + specifier: ^1.9.9 + version: registry.npmjs.org/turbo@1.9.9 version-bump-prompt: specifier: ^6.1.0 version: registry.npmjs.org/version-bump-prompt@6.1.0 @@ -6564,6 +6567,81 @@ packages: typescript: registry.npmjs.org/typescript@4.8.3 dev: true + registry.npmjs.org/turbo-darwin-64@1.9.9: + resolution: {integrity: sha512-UDGM9E21eCDzF5t1F4rzrjwWutcup33e7ZjNJcW/mJDPorazZzqXGKEPIy9kXwKhamUUXfC7668r6ZuA1WXF2Q==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/turbo-darwin-64/-/turbo-darwin-64-1.9.9.tgz} + name: turbo-darwin-64 + version: 1.9.9 + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + registry.npmjs.org/turbo-darwin-arm64@1.9.9: + resolution: {integrity: sha512-VyfkXzTJpYLTAQ9krq2myyEq7RPObilpS04lgJ4OO1piq76RNmSpX9F/t9JCaY9Pj/4TL7i0d8PM7NGhwEA5Ag==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/turbo-darwin-arm64/-/turbo-darwin-arm64-1.9.9.tgz} + name: turbo-darwin-arm64 + version: 1.9.9 + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + registry.npmjs.org/turbo-linux-64@1.9.9: + resolution: {integrity: sha512-Fu1MY29Odg8dHOqXcpIIGC3T63XLOGgnGfbobXMKdrC7JQDvtJv8TUCYciRsyknZYjyyKK1z6zKuYIiDjf3KeQ==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/turbo-linux-64/-/turbo-linux-64-1.9.9.tgz} + name: turbo-linux-64 + version: 1.9.9 + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + registry.npmjs.org/turbo-linux-arm64@1.9.9: + resolution: {integrity: sha512-50LI8NafPuJxdnMCBeDdzgyt1cgjQG7FwkyY336v4e95WJPUVjrHdrKH6jYXhOUyrv9+jCJxwX1Yrg02t5yJ1g==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/turbo-linux-arm64/-/turbo-linux-arm64-1.9.9.tgz} + name: turbo-linux-arm64 + version: 1.9.9 + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + registry.npmjs.org/turbo-windows-64@1.9.9: + resolution: {integrity: sha512-9IsTReoLmQl1IRsy3WExe2j2RKWXQyXujfJ4fXF+jp08KxjVF4/tYP2CIRJx/A7UP/7keBta27bZqzAjsmbSTA==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/turbo-windows-64/-/turbo-windows-64-1.9.9.tgz} + name: turbo-windows-64 + version: 1.9.9 + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + registry.npmjs.org/turbo-windows-arm64@1.9.9: + resolution: {integrity: sha512-CUu4hpeQo68JjDr0V0ygTQRLbS+/sNfdqEVV+Xz9136vpKn2WMQLAuUBVZV0Sp0S/7i+zGnplskT0fED+W46wQ==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/turbo-windows-arm64/-/turbo-windows-arm64-1.9.9.tgz} + name: turbo-windows-arm64 + version: 1.9.9 + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + registry.npmjs.org/turbo@1.9.9: + resolution: {integrity: sha512-+ZS66LOT7ahKHxh6XrIdcmf2Yk9mNpAbPEj4iF2cs0cAeaDU3xLVPZFF0HbSho89Uxwhx7b5HBgPbdcjQTwQkg==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/turbo/-/turbo-1.9.9.tgz} + name: turbo + version: 1.9.9 + hasBin: true + requiresBuild: true + optionalDependencies: + turbo-darwin-64: registry.npmjs.org/turbo-darwin-64@1.9.9 + turbo-darwin-arm64: registry.npmjs.org/turbo-darwin-arm64@1.9.9 + turbo-linux-64: registry.npmjs.org/turbo-linux-64@1.9.9 + turbo-linux-arm64: registry.npmjs.org/turbo-linux-arm64@1.9.9 + turbo-windows-64: registry.npmjs.org/turbo-windows-64@1.9.9 + turbo-windows-arm64: registry.npmjs.org/turbo-windows-arm64@1.9.9 + dev: true + registry.npmjs.org/type-check@0.3.2: resolution: {integrity: sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz} name: type-check