-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (73 loc) · 2.19 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: CI
on:
push:
branches: main
pull_request:
branches: main
jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Setup repo
uses: actions/checkout@v3
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v2.1.3
- name: Check types
run: deno task check
- name: Run linter
run: deno lint
- name: Run tests
run: deno test -A --no-check --coverage
# run: deno test -A --no-check --coverage
# - name: Generate coverage
# run: deno coverage --lcov coverage/ > cov.lcov
# - name: Upload coverage to Coveralls.io
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.COVERALLS_REPO_TOKEN }}
# path-to-lcov: cov.lcov
deploy:
name: Deploy & Lighthouse Check
needs: test
runs-on: ubuntu-latest
permissions:
id-token: write # Needed for auth with Deno Deploy
contents: read # Needed to clone the repository
pull-requests: write
statuses: write
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Install Deno
uses: denoland/setup-deno@v1
with:
deno-version: v2.x
- name: Build step
run: 'deno task build'
- name: Upload to Deno Deploy
id: deploy
uses: denoland/deployctl@v1
with:
project: 'nrakodotcom'
entrypoint: 'main.ts'
root: '.'
# TODO: Add lighthouse check back
# - name: Run Lighthouse CI
# uses: treosh/lighthouse-ci-action@v12
# continue-on-error: true
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# DEPLOYMENT_URL: ${{ steps.deploy.outputs.url }}
# LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
# with:
# configPath: './lighthouserc.json'
# urls: |
# ${{ steps.deploy.outputs.url }}
# ${{ steps.deploy.outputs.url }}/posts
# ${{ steps.deploy.outputs.url }}/posts/hello_web
# upoadArtifacts: true
# temporaryPublicStorage: true