Skip to content
Open
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
18 changes: 18 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye

# ARG UBUNTU_PACKAGES="bat p7zip p7zip-full p7zip-rar"
ARG UBUNTU_PACKAGES="bat p7zip p7zip-full"

RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends ${UBUNTU_PACKAGES} \
firefox-esr \
chromium \
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /var/tmp/*
# && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg && \
# install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/ && \
# sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main" > /etc/apt/sources.list.d/microsoft-edge-dev.list' && \
# rm microsoft.gpg && \
# apt-get update && \
# apt install -y microsoft-edge-stable
49 changes: 49 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
{
"name": "Node.js & TypeScript",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
// "image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye",
"build": {
"dockerfile": "Dockerfile"
},

// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
// "ghcr.io/devcontainers-contrib/features/apt-packages:1": {},
// "ghcr.io/devcontainers-contrib/features/browserify:2": {},
// "ghcr.io/devcontainers-contrib/features/gulp-cli:2": {},
// "ghcr.io/devcontainers-contrib/features/http-server:1": {},
// "ghcr.io/devcontainers-contrib/features/jshint:2": {},
// "ghcr.io/devcontainers-contrib/features/npm-package:1": {},
// "ghcr.io/devcontainers-contrib/features/ts-node:1": {},
// "ghcr.io/devcontainers-contrib/features/turborepo-npm:1": {},
// "ghcr.io/devcontainers-contrib/features/typescript:2": {}
},

// "runArgs": [
// "--net", "host",
// "-e", "DISPLAY=:0",
// "-e", "XAUTHORITY=/tmp/.Xauthority",
// "-v", "${localEnv:XAUTHORITY}:/tmp/.Xauthority"
// ]

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [8080],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "yarn install",

// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
// "esbenp.prettier-vscode",
"ms-vscode.live-server"
]
}
}

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for more information:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://containers.dev/guide/dependabot

version: 2
updates:
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly
24 changes: 17 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,36 @@
name: ci
on: [push, pull_request]

on:
push:
branches: [$default-branch]
pull_request:
branches: [$default-branch]

jobs:

build-and-run-unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x
- run: npm install
- run: grunt build-test-page
- run: node PuppeteerRunTests.js
- run: |
npm install
grunt build-test-page
node PuppeteerRunTests.js

screenshot-circuit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x
- run: npm install
- run: npm run build
- run: node PuppeteerScreenshotCircuit.js
- run: |
npm install
npm run build
node PuppeteerScreenshotCircuit.js
- uses: actions/upload-artifact@v2
with:
name: screenshot
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Publish to GitHub Pages

on:
push:
# branches-ignore: [$default-branch]
paths-ignore:
- '.devcontainer/**'
- '.vscode/**'
# - 'out/**'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Build
run: |
npm install
npm run build

- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: out
single-commit: true

# - name: Deploy
# uses: peaceiris/actions-gh-pages@v3
# with:
# publish_dir: ./out
# force_orphan: true

# - name: Upload artifact
# uses: actions/upload-pages-artifact@v3
# with:
# path: out
# - name: Deploy
# uses: actions/deploy-pages@v4
Loading