Skip to content

Commit

Permalink
Add to readme and finish presentation
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisDuarte1 committed Apr 2, 2024
1 parent d5594c2 commit 5831057
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Binary file added gh-actions-workshop/assets/template.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
70 changes: 69 additions & 1 deletion gh-actions-workshop/presentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 😅
### 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:

<div style="display:flex; flex-direction: column; justify-content: space-between; height:15rem">
<div style="display:flex; justify-content: center">
<a href="https://github.com/NIAEFEUP/workshop-ci-24">https://github.com/NIAEFEUP/workshop-ci-24</a>
</div>


<div style="display:flex; justify-content: center">
<img src="assets/template.png">
</div>
</div>

**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?

0 comments on commit 5831057

Please sign in to comment.