Skip to content

Commit

Permalink
workflows: Rearrange github actions to be more streamlined
Browse files Browse the repository at this point in the history
 - Rename `build` workflow to `test` (as it was only running tests)
 - Add check for validity of editorconfig
 - Rename file from `.yml` to `.yaml`
  • Loading branch information
hjpotter92 committed Feb 2, 2024
1 parent acea73f commit 3678707
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 35 deletions.
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{js,sol}]
indent_style = true
indent_size = 4
Expand Down
35 changes: 0 additions & 35 deletions .github/workflows/build.yml

This file was deleted.

File renamed without changes.
65 changes: 65 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Run test suite for the project

on:
pull_request:
push:
branches:
- delta
- confluence
- streamflow
- next
- master

jobs:
test:
name: Test with coverage
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0
# Check https://github.com/livepeer/go-livepeer/pull/1891
# for ref value discussion
ref: ${{ github.event.pull_request.head.sha }}

- uses: actions/setup-node@v3
with:
node-version: "16"
cache: "yarn"

- name: Install dependencies
run: yarn install

- name: Run linter
run: yarn lint

- name: Compile contracts
run: yarn compile

- name: 💡 Run contract tests with coverage reporting
run: yarn test:coverage

- name: Upload coverage reports
uses: codecov/codecov-action@v3
with:
files: ./coverage/lcov.info
name: protocol
token: ${{ secrets.CI_CODECOV_TOKEN }}

editorconfig:
name: Run editorconfig checker
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/[email protected]
with:
# Check https://github.com/livepeer/go-livepeer/pull/1891
# for ref value discussion
ref: ${{ github.event.pull_request.head.sha }}

- name: Install editorconfig-checker
uses: editorconfig-checker/action-editorconfig-checker@main

- name: Run editorconfig checker against the repo
run: editorconfig-checker

0 comments on commit 3678707

Please sign in to comment.