diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..fdb8685 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,45 @@ +name: CI + +# Controls when the workflow will run +on: push + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./backend + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 20.0.0 + + - name: Setup yarn + run: npm install -g yarn + + - name: Install Dependencies + run: yarn install + + # Compile + - name: Compile + run: yarn hardhat compile + + # Solhint + - name: Linter + run: yarn hardhat check + + # Tests + - name: Test + run: REPORT_GAS=true yarn hardhat test + + # Coverage + - name: Coverage + id: coverage + run: yarn hardhat coverage