diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 0531953..bbdd662 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -12,11 +12,8 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Install dependencies - run: npm ci - - - name: Format files using prettier - run: npm run format + - name: Format files + run: make format - uses: stefanzweifel/git-auto-commit-action@v4 name: Commit possible changes @@ -27,8 +24,5 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Install dependencies - run: npm ci - - name: Build the project - run: npm run build + run: make build diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..bc4fdb7 --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +NPM=npm + +.PHONY: install-deps +install-deps: + $(NPM) ci + +.PHONY: build +build: install-deps + $(NPM) run build + +.PHONY: clean +format: install-deps + $(NPM) run format + +.PHONY: test +test: install-deps + $(NPM) run test +