diff --git a/README.md b/README.md index 0ff197d..d013a46 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,8 @@ - [Web Extension](https://niaefeup.github.io/slides/web-extension) +- [CI/CD](https://niaefeup.github.io/slides/gh-actions-workshop) + ## Archived Workshop Slides - [Flutter](https://niaefeup.github.io/slides/uni-flutter-internal-workshop) diff --git a/gh-actions-workshop/assets/template.png b/gh-actions-workshop/assets/template.png new file mode 100644 index 0000000..3421c9a Binary files /dev/null and b/gh-actions-workshop/assets/template.png differ diff --git a/gh-actions-workshop/presentation.md b/gh-actions-workshop/presentation.md index aa1eda0..ddff1c3 100644 --- a/gh-actions-workshop/presentation.md +++ b/gh-actions-workshop/presentation.md @@ -451,4 +451,72 @@ Sometimes the best way to learn is by looking at how the community implements CI class: inverse, center, middle # Hands-on -### I hope that wasn't too overwhelming 😅 \ No newline at end of file +### I hope that wasn't too overwhelming 😅 + +--- + +### The objective + +Let's imagine you've recently entered a company that develops a Flutter application, CineScope (completely not my ESOF project) however they have no CI/CD processes and they would like you to implement it. + +You should have: + - A CI pipeline that runs the linter, the formatter, and finally, the unit tests. It should run on every PR but also every push to the main branch; + - A CD pipeline that builds the final application as an APK and creates a GitHub Release for it. + +--- + +### How to + +You should create a new repository that is a template of this repo: + +
+
+ https://github.com/NIAEFEUP/workshop-ci-24 +
+ + +
+ +
+
+ +**NOTE:** you should create it as a public repository because this way you don't waste your precious free minutes. + +--- + +### Developing locally + +You can use [act](https://github.com/nektos/act), which is a tool that allows you to run GitHub Action _workflows_ locally using _docker_. However, this is not 100% accurate and some things might not work on the GitHub runners. + +I recommend creating a new branch for testing and committing and pushing every change. However, you might not want to have too many commits on your PR so you can amend the last commit and force push it: + +```sh +git commit -a --amend && git push --force +``` + +--- + +### Tips +You might not know Flutter, so here are the important commands to do the 3 tasks with them: + +```sh +# format command +dart format . --set-exit-if-changed +``` + +```sh +# lint command +flutter analyze +``` + +```sh +# release build apk +flutter build apk +``` + +--- + +class: inverse, middle, center + +# Thank you! +## Any questions? \ No newline at end of file