Skip to content

Commit 8c98361

Browse files
authored
create-turbo: improve test cases and make them pass (#1655)
- Make existing tests pass - Add GH action to run tests in CI Set up a new Github Action that builds the turbo CLI (since that is required for the create-turbo tests) and runs the JS tests for that package. Notable things: - Installs yarn and disables corepack as part of the test suite. This is the pristine state we want for the tests that exist today. For future tests cases that have a different setup, we may need to modify this more. - Disables Windows tests. This yarn setup on Windows does not seem to work, but this gets us one step forward.
1 parent 1cf9024 commit 8c98361

File tree

3 files changed

+242
-100
lines changed

3 files changed

+242
-100
lines changed

.github/workflows/ci-go.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: CI Go
22

33
concurrency:
44
group: ${{ github.workflow }}-${{ github.ref }}

.github/workflows/ci-js.yml

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: CI JS
2+
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
on:
8+
push:
9+
branches: ["main"]
10+
pull_request:
11+
types: [opened, edited, synchronize]
12+
13+
jobs:
14+
build:
15+
name: build and test
16+
timeout-minutes: 15
17+
runs-on: ${{ matrix.os }}
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
os: [
22+
ubuntu-latest,
23+
macos-latest,
24+
# windows-latest,
25+
]
26+
27+
steps:
28+
- name: Check out code
29+
uses: actions/checkout@v3
30+
with:
31+
fetch-depth: 2
32+
33+
- name: Set up Go
34+
uses: actions/setup-go@v3
35+
with:
36+
go-version: 1.18.0
37+
cache: true
38+
cache-dependency-path: cli/go.sum
39+
40+
- name: Set Up Protoc
41+
uses: arduino/setup-protoc@v1
42+
with:
43+
version: "3.x"
44+
repo-token: ${{ secrets.GITHUB_TOKEN }}
45+
46+
- name: Set Up Go and GRPC protobuf
47+
run: |
48+
go install google.golang.org/protobuf/cmd/[email protected]
49+
go install google.golang.org/grpc/cmd/[email protected]
50+
51+
- uses: pnpm/[email protected]
52+
with:
53+
version: 7.2.1
54+
55+
- name: Setup Yarn
56+
run: npm i -g yarn
57+
58+
- name: Setup Node.js environment
59+
uses: actions/setup-node@v2
60+
with:
61+
node-version: 16
62+
cache: pnpm
63+
64+
- name: Configure corepack
65+
# Forcibly upgrade our available version of corepack.
66+
# The bundled version in node 16 has known issues.
67+
# Prepends the corepack bin dir so that it is always first.
68+
shell: bash
69+
run: |
70+
npm install --force --global corepack@latest
71+
npm config get prefix >> $GITHUB_PATH
72+
corepack enable
73+
74+
- name: Install dependencies
75+
run: pnpm install
76+
77+
- name: Run create-turbo tests
78+
run: pnpm -- turbo run test --filter=create-turbo --color

0 commit comments

Comments
 (0)