diff --git a/.github/workflows/cadence_tests.yml b/.github/workflows/cadence_tests.yml index 0a8693a7..3375d365 100644 --- a/.github/workflows/cadence_tests.yml +++ b/.github/workflows/cadence_tests.yml @@ -37,15 +37,17 @@ jobs: restore-keys: | ${{ runner.os }}-flow-emulator-fork- - name: Install Flow CLI - run: sh -ci "$(curl -fsSL https://raw.githubusercontent.com/onflow/flow-cli/master/install.sh)" - - name: Flow CLI Version - run: flow version - - name: Update PATH - run: echo "/root/.local/bin" >> $GITHUB_PATH + run: sh -ci "$(curl -fsSL https://raw.githubusercontent.com/onflow/flow-cli/master/install.sh)" -- v2.16.0 + - name: Update PATH and show Flow version + run: | + echo "/root/.local/bin" >> $GITHUB_PATH + echo "$HOME/.local/bin" >> $GITHUB_PATH + which flow || true + flow version - name: Install dependencies run: flow deps install --skip-alias --skip-deployments - name: Run tests - run: flow test --cover --covercode="contracts" --coverprofile="coverage.lcov" ./cadence/tests/*_test.cdc + run: make ci - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 env: diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..5f666cc7 --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +.PHONY: test +test: + flow test --cover --covercode="contracts" --coverprofile="coverage.lcov" ./cadence/tests/*_test.cdc + +.PHONY: lint +lint: + find cadence -name "*.cdc" | xargs flow cadence lint --warnings-as-errors + +.PHONY: ci +ci: lint test