Skip to content

Miscellaneous repo cleanup #560

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Oct 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ Dockerfile
npm-debug.log
**/tsconfig.tsbuildinfo
/packages/lit-dev-api/lit/
/packages/lit-dev-tests/
82 changes: 0 additions & 82 deletions .github/workflows/build.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/check-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Check format

on: [push, pull_request]

jobs:
check-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
# Don't cache because we don't bootstrap

- run: npm ci
- run: npm run format:check
19 changes: 19 additions & 0 deletions .github/workflows/check-links-external.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Check external links

on: [push, pull_request]

jobs:
check-links-external:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
cache: npm
cache-dependency-path: '**/package-lock.json'

- run: npm ci
- run: npm run bootstrap
- run: npm run build
- run: npm run test:links:external
20 changes: 20 additions & 0 deletions .github/workflows/check-links-internal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Check internal links

on: [push, pull_request]

jobs:
check-links-internal:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
cache: npm
cache-dependency-path: '**/package-lock.json'

- run: npm ci
- run: npm run bootstrap
- run: npm run build
- run: npm run test:links:redirects
- run: npm run test:links:internal
41 changes: 0 additions & 41 deletions .github/workflows/generate-goldens.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Integration tests

on: [push, pull_request]

jobs:
integration-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
cache: npm
cache-dependency-path: '**/package-lock.json'

- run: npm ci
- run: npx playwright install-deps
- run: npm run bootstrap
- run: npm run build

- id: test
run: npm run test:integration

- if: ${{ always() && steps.test.outcome == 'failure' }}
run: npm run test:integration:update-golden-screenshots

- if: ${{ always() && steps.test.outcome == 'failure' }}
Comment on lines +24 to +27
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brilliant!

uses: actions/upload-artifact@v2
with:
name: golden-results
path: tests/**/**.png
19 changes: 19 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Unit tests

on: [push, pull_request]

jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
cache: npm
cache-dependency-path: '**/package-lock.json'

- run: npm ci
- run: npm run bootstrap
- run: npm run build
- run: npm run test:unit
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ packages/lit-dev-api/api-data/**/*
!packages/lit-dev-api/api-data/.gitkeep

# We only want to keep '-linux' screenshots which are tested by Github Actions.
tests/**/*.png
!tests/**/*-linux.png
packages/lit-dev-tests/src/playwright/**/*.png
!packages/lit-dev-tests/src/playwright/**/*-linux.png
test-results

*.tsbuildinfo
Expand Down
8 changes: 7 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,11 @@ package-lock.json
/packages/lit-dev-content/site/
/packages/lit-dev-content/_site/
/packages/*/lib/
/packages/*/index.*
/packages/lit-dev-server/src/redirects.ts
/packages/lit-dev-api/
/packages/lit-dev-content/_dev/
/packages/lit-dev-content/_site/
/packages/lit-dev-content/rollupout/
# TODO(aomarks) Would be nice to format samples, but Prettier doesn't always do
# a great job compared to our manual formatting.
/packages/lit-dev-content/samples/
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ WORKDIR /usr/src/app
# to execute the final Eleventy build step.

# External dependencies
COPY package*.json lerna.json ./
COPY packages/lit-dev-tools/package*.json ./packages/lit-dev-tools/
COPY package*.json lerna.json tsconfig.base.json ./
COPY packages/lit-dev-tools-cjs/package*.json ./packages/lit-dev-tools-cjs/
COPY packages/lit-dev-tools-esm/package*.json ./packages/lit-dev-tools-esm/
COPY packages/lit-dev-server/package*.json ./packages/lit-dev-server/
COPY packages/lit-dev-api/package*.json ./packages/lit-dev-api/
COPY packages/lit-dev-content/package*.json ./packages/lit-dev-content/
RUN npm ci && npm run bootstrap

# Tooling code
COPY packages/lit-dev-tools/ ./packages/lit-dev-tools/
COPY packages/lit-dev-tools-cjs/ ./packages/lit-dev-tools-cjs/
COPY packages/lit-dev-tools-esm/ ./packages/lit-dev-tools-esm/
COPY packages/lit-dev-server/ ./packages/lit-dev-server/
RUN npx lerna run build:ts --scope lit-dev-tools --scope lit-dev-tools-esm --scope lit-dev-server --stream
RUN npx lerna run build:ts --scope lit-dev-tools-cjs --scope lit-dev-tools-esm --scope lit-dev-server --stream

# Generated API docs
COPY packages/lit-dev-api/ ./packages/lit-dev-api/
Expand Down
68 changes: 37 additions & 31 deletions lit-dev.code-workspace
Original file line number Diff line number Diff line change
@@ -1,33 +1,39 @@
{
"folders": [
{
"name": "lit-dev-content",
"path": "packages/lit-dev-content",
},
{
"name": "lit-dev-tools",
"path": "packages/lit-dev-tools",
},
{
"name": "lit-dev-api",
"path": "packages/lit-dev-api",
},
{
"name": "lit-dev-server",
"path": "packages/lit-dev-server",
},
{
"name": "lit.dev",
"path": "."
}
],
"settings": {
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
},
"extensions": {
"recommendations": [
"esbenp.prettier-vscode",
]
}
"folders": [
{
"name": "lit-dev-content",
"path": "packages/lit-dev-content"
},
{
"name": "lit-dev-tools-cjs",
"path": "packages/lit-dev-tools-cjs"
},
{
"name": "lit-dev-tools-esm",
"path": "packages/lit-dev-tools-esm"
},
{
"name": "lit-dev-tests",
"path": "packages/lit-dev-tests"
},
{
"name": "lit-dev-api",
"path": "packages/lit-dev-api"
},
{
"name": "lit-dev-server",
"path": "packages/lit-dev-server"
},
{
"name": "lit.dev",
"path": "."
}
],
"settings": {
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true
},
"extensions": {
"recommendations": ["esbenp.prettier-vscode"]
}
}
Loading