In order to facilitate beginning a new project, we discuss what we usually do in this blog.
There are two types of projects that contain the minimum operational supplies:
- Web server
- Application server
Using back-end, we have prepared projects that fit for both sites and applications. To begin the programmatic work of, they contain all libraries the project may need, but in a way that guarantees the basic needs such as:
- The basic division of the project
- Database requirements
- Organizing and developing project layers
- Installing some basic services in each project, such as:
a. File upload service
b. Image processing services
c. Authentication and security services. For instance, account creation, login, and authentication.
Furthermore, projects are also equipped with the necessary technologies to test the quality of the written code, which ensure its correctness and detect problems and errors in the code, which are automatically triggered by the git actions.
Sometimes, these libraries require configuring a file that contains a set of rules. For instance, the files that should be ignored. Furthermore, reducing the verification percentage for a specific rule.
After pushing the latest changes in
composer.yml, create a new GitHub workflow following these steps:
In your repo, go to GitHub -> workflows and then, create a new file and name it
Furthermore, the following code determines the actions and branches that we want to run our workflow:
For jobs, we use the following code to determine them:
To build our project, we choose the Ubuntu machine, then run the composer and
install –dev on this machine.
After that, we run the unit test and code sniffer tool.
The last steps to make this workflow require the following implementations:
- Go to setting -> branches -> add rule
- Set branch name pattern to * and set options in this manner
We provided a sample of our work which illustrates the previous idea and puts it in practice: GitHub