Enable TypeScript and add types to ApiClient and vuex store #119
Workflow file for this run
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
name: Continuous Integration | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go: ["1.21", "1.20"] | |
node: [21, 20] | |
exclude: | |
- go: 1.21 | |
node: 20 | |
- go: 1.20 | |
node: 21 | |
name: Go ${{ matrix.go }}, Node ${{ matrix.node }} build | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Node.js ${{ matrix.node }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: "yarn" | |
cache-dependency-path: "web/yarn.lock" | |
- name: Build frontend | |
working-directory: ./web | |
run: | | |
yarn install --frozen-lockfile | |
yarn build | |
- name: Set up Go ${{ matrix.go }} | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go }} | |
cache: true | |
- name: Install dependencies | |
run: sudo apt-get install -y libpcap-dev | |
- name: Build | |
run: go build -v ./cmd/pkappa2/main.go | |
golangci: | |
name: Lint Go | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: 1.21 | |
- name: Install dependencies | |
run: sudo apt-get install -y libpcap-dev | |
- name: Fake frontend build | |
run: | | |
mkdir -p web/dist | |
touch web/dist/index.html | |
- name: Lint | |
uses: golangci/golangci-lint-action@v3 | |
yarnlint: | |
name: Lint Frontend | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Node.js 20 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: "yarn" | |
cache-dependency-path: "web/yarn.lock" | |
- name: Install frontend dependencies | |
working-directory: ./web | |
run: yarn install --frozen-lockfile | |
- name: Lint frontend | |
working-directory: ./web | |
run: | | |
yarn lint | |
yarn prettier --check . |