diff --git a/.gitea/workflows/alerter.yml b/.gitea/workflows/alerter.yml new file mode 100644 index 0000000..9e774e4 --- /dev/null +++ b/.gitea/workflows/alerter.yml @@ -0,0 +1,64 @@ +name: go + +on: + push: + paths: + - alerter/** + branches: + - main + pull_request: + paths: + - alerter/** + branches: + - main + +env: + GO111MODULE: "on" + +jobs: + lint: + runs-on: ubuntu + if: ${{ !contains(github.ref, 'calendar') }} + steps: + - name: Extract branch name + run: echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: ~1.22 + + - name: Check out code + uses: actions/checkout@v3 + + - name: Linters + uses: golangci/golangci-lint-action@v4.0.0 + with: + version: latest + skip-build-cache: true + skip-pkg-cache: true + working-directory: ./alerter + + tests: + runs-on: ubuntu + if: ${{ !contains(github.ref, 'calendar') }} + steps: + - name: Extract branch name + run: echo "BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: ^1.22 + + - name: Check out code + uses: actions/checkout@v3 + + - name: Unit tests + run: go test -v -count=1 -race -timeout=1m ./... + working-directory: ./alerter + + - name: Optimization tests + run: go test -v -count=1 -timeout=1m -tags bench ./... + if: env.BRANCH == 'hw10_program_optimization' + working-directory: ./alerter diff --git a/.gitea/workflows/live_monitor_ui.yml b/.gitea/workflows/live_monitor_ui.yml new file mode 100644 index 0000000..7efe03b --- /dev/null +++ b/.gitea/workflows/live_monitor_ui.yml @@ -0,0 +1,38 @@ +name: live_monitor_ui + +on: + push: + branches: + - main + - live_monitor_ts_workflow + pull_request: + branches: + - main + - live_monitor_ts_workflow + +jobs: + lint: + name: lint + runs-on: 'ubuntu' + steps: + - name: Checkout + uses: actions/checkout@v4.1.1 + + - name: cd live_monitor_ts + run: cd live_monitor_ts + + - name: Install Node + uses: actions/setup-node@v4 + with: + node-version: '21.x' + + - name: install yarn + run: npm install --global yarn + + - name: install node_modules + run: npm install + working-directory: ./live_monitor_ts + + - name: lint + run: npm run lint + working-directory: ./live_monitor_ts \ No newline at end of file