style: run prettier
This commit is contained in:
parent
683e39edcb
commit
0d8974c378
|
@ -2,11 +2,7 @@ name: API
|
|||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "api/**"
|
||||
pull_request:
|
||||
paths:
|
||||
- "api/**"
|
||||
branches: [ "master" ]
|
||||
|
||||
jobs:
|
||||
api-build:
|
||||
|
|
|
@ -2,11 +2,7 @@ name: Client
|
|||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "client/**"
|
||||
pull_request:
|
||||
paths:
|
||||
- "client/**"
|
||||
branches: [ "master" ]
|
||||
|
||||
jobs:
|
||||
client-build:
|
||||
|
|
|
@ -0,0 +1,98 @@
|
|||
name: PR
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ "*" ]
|
||||
|
||||
jobs:
|
||||
client-build:
|
||||
name: Client
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./client
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v2.1.5
|
||||
with:
|
||||
node-version: 14.x
|
||||
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
|
||||
- name: cache node_modules
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
- name: Installling dependencies
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: yarn
|
||||
|
||||
- name: Lint
|
||||
run: yarn lint
|
||||
|
||||
- name: Build
|
||||
run: yarn build
|
||||
env:
|
||||
VITE_SENTRY_DSN: https://examplePublicKey@o0.ingest.sentry.io/0
|
||||
VITE_NODE_ENV: development
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: javascript
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
|
||||
api-build:
|
||||
name: API
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./api
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.16.x
|
||||
|
||||
- name: cache node_modules
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-go-
|
||||
|
||||
- name: Installling dependencies
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: go mod vendor
|
||||
|
||||
- name: Build
|
||||
run: go build main.go
|
||||
|
||||
- name: Run test & coverage
|
||||
run: go test -v -race -coverprofile=coverage.out -covermode=atomic ./...
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: go
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
|
@ -24,21 +24,19 @@
|
|||
|
||||
<section>
|
||||
<h2>{$_('guide.direct.1')} <code><img></code> {$_('guide.direct.2')}</h2>
|
||||
<Codeblock>
|
||||
<img src="https://jokesbapak2.herokuapp.com/v1/" />
|
||||
</Codeblock>
|
||||
<Codeblock><img src="https://jokesbapak2.herokuapp.com/v1/" /></Codeblock>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>{$_('guide.fetch.1')}</h2>
|
||||
<p>{$_('guide.fetch.2')}</p>
|
||||
<Codeblock>
|
||||
fetch("https://jokesbapak2.herokuapp.com/v1/")<br>
|
||||
.then(response => response.text())<br>
|
||||
.then(data => console.log(data))<br>
|
||||
<br>
|
||||
// {$_('guide.fetch.3')}<br>
|
||||
<br>
|
||||
fetch("https://jokesbapak2.herokuapp.com/v1/")<br />
|
||||
.then(response => response.text())<br />
|
||||
.then(data => console.log(data))<br />
|
||||
<br />
|
||||
// {$_('guide.fetch.3')}<br />
|
||||
<br />
|
||||
<img src="data:image/jpeg;base64, { data }" />
|
||||
</Codeblock>
|
||||
</section>
|
||||
|
@ -60,4 +58,4 @@
|
|||
section {
|
||||
@apply pt-6;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue