[pre-commit.ci] pre-commit autoupdate #512
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] | |
jobs: | |
format-go: | |
name: format-go | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
go: [1.18] | |
steps: | |
- name: Git Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Go ${{ matrix.go }} | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Format Go files | |
run: make fmt | |
- name: Exit If Git Diff | |
run: | | |
chmod +x ./scripts/exit_if_diff.sh | |
./scripts/exit_if_diff.sh | |
golangci-lint: | |
name: golangci-lint | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
go: [1.18] | |
workdir: [backend_service, mongo_service, postgres_service] | |
steps: | |
- name: Git Checkout | |
uses: actions/checkout@v3 | |
- name: Setup ${{ matrix.go }} | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Lint ${{ matrix.workdir }} | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: latest | |
working-directory: ${{ matrix.workdir }} | |
web: | |
name: client | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node: [18] | |
defaults: | |
run: | |
working-directory: web | |
steps: | |
- name: Git Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node ${{ matrix.node }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: "npm" | |
cache-dependency-path: web/package-lock.json | |
- name: Install packages | |
run: npm ci | |
- name: Prettier | |
run: npm run fmt:check | |
- name: ESLint | |
run: npm run lint:fix |