ci: add CI (#21)
* ci: add ci * ci: add lint and fmt * build: add dockerfile * ci: change version * ci: deno check * build: add .gitattributes * ci: use glob * ci: add prmain
parent
068daa15bd
commit
239db3b2f3
|
|
@ -0,0 +1,3 @@
|
|||
cache/
|
||||
export/
|
||||
*.json
|
||||
|
|
@ -0,0 +1 @@
|
|||
* text=auto eol=lf
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
name: Build
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
deno: [1.x, "1.21.x", canary]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: denoland/setup-deno@v1
|
||||
with:
|
||||
deno-version: ${{ matrix.deno }}
|
||||
- name: Check fmt
|
||||
run: deno fmt --check
|
||||
- name: Run lint
|
||||
run: deno lint
|
||||
- name: All entries
|
||||
uses: tj-actions/glob@v16
|
||||
id: entries
|
||||
with:
|
||||
files: |
|
||||
s3si.ts
|
||||
initRank.ts
|
||||
./scripts/*.ts
|
||||
- name: Check entries
|
||||
run: deno check ${{ steps.entries.outputs.paths }}
|
||||
- name: Run tests
|
||||
run: deno test
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
FROM denoland/deno:1.26.2
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Cache the dependencies as a layer (the following two steps are re-run only when deps.ts is modified).
|
||||
# Ideally cache deps.ts will download and compile _all_ external files used in main.ts.
|
||||
COPY deps.ts .
|
||||
RUN deno cache deps.ts
|
||||
|
||||
# These steps will be re-run upon each file change in your working directory:
|
||||
ADD . .
|
||||
# Compile the main app so that it doesn't need to be compiled each startup/entry.
|
||||
RUN deno cache s3si.ts
|
||||
|
||||
CMD ["run", "-A", "s3si.ts", "-n"]
|
||||
Loading…
Reference in New Issue