-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added ci pipelines * Fix web test
- Loading branch information
Showing
2 changed files
with
83 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: Project CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
- "v*.[0-9]" | ||
pull_request: | ||
|
||
jobs: | ||
web-ci: | ||
name: Project CI | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: ["20.10.x"] | ||
dir : ["web"] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup environment | ||
run: mv .env.example .env | ||
working-directory: ${{ matrix.dir }} | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
working-directory: ${{ matrix.dir }} | ||
|
||
- name: Install Yarn | ||
run: | | ||
npm install -g yarn | ||
npm i | ||
working-directory: ${{ matrix.dir }} | ||
|
||
- name: Run lint | ||
run: yarn lint | ||
working-directory: ${{ matrix.dir }} | ||
|
||
- name: Run tests | ||
run: yarn test:unit | ||
working-directory: ${{ matrix.dir }} | ||
|
||
server-ci: | ||
name: Wev CI | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
go-version: ["1.22.x"] | ||
dir: ["server", "data-embedding"] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- uses: WillAbides/setup-go-faster@v1.14.0 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
|
||
- name: Run test | ||
run: go test ./... | ||
working-directory: ${{ matrix.dir }} | ||
|
||
- name: Run vet | ||
run: go vet ./... | ||
working-directory: ${{ matrix.dir }} | ||
|
||
# This action doesn't work with go-version > 1.19 😟 | ||
# - uses: dominikh/staticcheck-action@v1.3.0 | ||
# with: | ||
# version: "2022.1.3" | ||
# install-go: false | ||
# cache-key: ${{ matrix.go-version }} | ||
# working-directory: ${{ matrix.dir }} |
6 changes: 3 additions & 3 deletions
6
...c/components/__tests__/HelloWorld.spec.ts → web/src/components/__tests__/Header.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import { describe, it, expect } from 'vitest' | ||
|
||
import { mount } from '@vue/test-utils' | ||
import EmailsVisualizer from '../EmailsVisualizer.vue' | ||
import Header from '../Header.vue' | ||
|
||
describe('EmailsVisualizer', () => { | ||
describe('Header', () => { | ||
it('renders properly', () => { | ||
const wrapper = mount(EmailsVisualizer, { props: { msg: 'Hello Vitest' } }) | ||
const wrapper = mount(Header, { props: { msg: 'Hello Vitest' } }) | ||
expect(wrapper.text()).toContain('Hello Vitest') | ||
}) | ||
}) |