From 7a32c3afbf85f93f21e147f46147051ff7f03818 Mon Sep 17 00:00:00 2001 From: 3y3 <3y3@ya.ru> Date: Mon, 11 Dec 2023 19:12:40 +0300 Subject: [PATCH] chore: Add gh actions --- .github/workflows/quality.yaml | 22 ++++++++++++++++++++++ .github/workflows/release.yaml | 19 +++++++++++++++++++ .github/workflows/tests.yaml | 22 ++++++++++++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 .github/workflows/quality.yaml create mode 100644 .github/workflows/release.yaml create mode 100644 .github/workflows/tests.yaml diff --git a/.github/workflows/quality.yaml b/.github/workflows/quality.yaml new file mode 100644 index 0000000..17dd2fa --- /dev/null +++ b/.github/workflows/quality.yaml @@ -0,0 +1,22 @@ +name: Code quality + +on: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x] + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: "npm" + - run: npm ci + - run: npm run lint diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..3ae38e9 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,19 @@ +on: + push: + branches: [master] + +name: release + +permissions: + contents: write + pull-requests: write + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: yandex-cloud/ui-release-action@main + with: + github-token: ${{ secrets.YC_UI_BOT_GITHUB_TOKEN }} + npm-token: ${{ secrets.ROBOT_DATAUI_NPM_TOKEN }} + node-version: 18 diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 0000000..addf55e --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,22 @@ +name: Unit tests + +on: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x] + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: "npm" + - run: npm ci + - run: npm run test