diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..e709450 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,5 @@ +Frontend: + - frontend/**/* + +Backend: + - backend/**/* diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml new file mode 100644 index 0000000..3646d02 --- /dev/null +++ b/.github/workflows/backend.yml @@ -0,0 +1,24 @@ +name: Backend CI + +on: + push: + paths: + - 'backend/**' + - '!frontend/**' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Build + working-directory: ./backend + run: cargo build --verbose + - name: Run tests + working-directory: ./backend + run: cargo test --verbose + - name: Request help + working-directory: ./backend + run: cargo run --release -- --help diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml new file mode 100644 index 0000000..b038cdb --- /dev/null +++ b/.github/workflows/frontend.yml @@ -0,0 +1,38 @@ +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Frontend CI + +on: + push: + paths: + - 'frontend/**' + - '!backend/**' + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [10.x, 12.x] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: install + working-directory: ./frontend + run: yarn install + - name: check + run: yarn check + working-directory: ./frontend + - name: Test + run: yarn test + working-directory: ./frontend + - name: Build + working-directory: ./frontend + run: yarn build diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml new file mode 100644 index 0000000..e90b599 --- /dev/null +++ b/.github/workflows/label.yml @@ -0,0 +1,19 @@ +# This workflow will triage pull requests and apply a label based on the +# paths that are modified in the pull request. +# +# To use this workflow, you will need to set up a .github/labeler.yml +# file with configuration. For more information, see: +# https://github.com/actions/labeler/blob/master/README.md + +name: Labeler +on: [pull_request] + +jobs: + label: + + runs-on: ubuntu-latest + + steps: + - uses: actions/labeler@v2 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/frontend/package.json b/frontend/package.json index 7b16b0c..59265dc 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "@dotstats/frontend", - "version": "0.1.0", + "version": "0.2.0", "author": "Parity Technologies Ltd. ", "license": "GPL-3.0", "description": "Polkadot Telemetry frontend",