Skip to content

Commit ed58ebe

Browse files
committed
🔧 Update CI
1 parent d38ece9 commit ed58ebe

File tree

3 files changed

+92
-9
lines changed

3 files changed

+92
-9
lines changed

.github/workflows/cd.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# cd.yaml
2+
3+
name: Build and Deploy
4+
5+
on: [push]
6+
7+
jobs:
8+
build-and-deploy:
9+
concurrency: ci-${{ github.ref }}
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout 🛎️
13+
uses: actions/checkout@v3
14+
15+
- name: Install and Build 🔧
16+
run: |
17+
mkdir output
18+
cp readme.md output/
19+
echo theme: jekyll-theme-cayman >> output/_config.yml
20+
- name: Deploy 🚀
21+
uses: JamesIves/github-pages-deploy-action@v4.2.5
22+
with:
23+
branch: gh-pages
24+
folder: output

.github/workflows/ci.yaml

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,46 @@
1+
# .github/workflows/ci.yaml
2+
13
name: CI
24

3-
on: push
5+
on: [push, pull_request]
46

57
jobs:
6-
ci:
7-
name: Lint and check format.
8-
runs-on: ubuntu-latest
8+
build:
9+
name: Test (${{ matrix.os }})
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest, windows-latest, macOS-latest]
14+
fail-fast: true
915
steps:
10-
- uses: actions/checkout@v3
11-
- uses: denoland/setup-deno@v1
16+
- name: Checkout
17+
uses: actions/checkout@v3
18+
19+
- name: Setup Deno
20+
uses: denoland/setup-deno@v1
1221
with:
1322
deno-version: v1.x
14-
- run: deno lint
15-
- run: deno fmt --check
16-
- run: deno test
23+
24+
- name: Check Code Format
25+
if: matrix.os == 'ubuntu-latest'
26+
run: deno fmt --check
27+
28+
- name: Lint
29+
if: matrix.os == 'ubuntu-latest'
30+
run: deno lint
31+
32+
- name: Bundle
33+
run: deno bundle mod.ts mod.bundle.js
34+
35+
- name: Tests
36+
run: deno test --coverage=./cov
37+
38+
- name: Generate Coverage
39+
if: matrix.os == 'ubuntu-latest'
40+
run: deno coverage --unstable --lcov ./cov > cov.lcov
41+
42+
- name: Upload Coverage
43+
if: matrix.os == 'ubuntu-latest'
44+
uses: codecov/codecov-action@v2
45+
with:
46+
files: cov.lcov

.github/workflows/deps.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: update-deno-dependencies
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 0 1 * *"
7+
8+
jobs:
9+
udd:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: denoland/setup-deno@v1
14+
- name: Update dependencies
15+
run: >
16+
deno run -A https://deno.land/x/udd/main.ts
17+
$(find . -name "*.ts")
18+
- name: Create Pull Request
19+
uses: peter-evans/create-pull-request@v3
20+
with:
21+
commit-message: "⬆️ Update dependencies"
22+
title: Update Deno Dependencies
23+
body: >
24+
Automated updates by [deno-udd](https://github.com/hayd/deno-udd) and the
25+
[create-pull-request](https://github.com/peter-evans/create-pull-request)
26+
action.
27+
branch: update-deno-dependencies
28+
author: GitHub <noreply@github.com>
29+
delete-branch: true

0 commit comments

Comments
 (0)