Skip to content

Commit a5765a3

Browse files
authored
Upgrade CI runner version and README (#1259)
* Upgrade Ubuntu runner version * Update PostgreSQL install instructions * Update CD workflow
1 parent bd37d04 commit a5765a3

File tree

3 files changed

+14
-19
lines changed

3 files changed

+14
-19
lines changed

.github/workflows/cd.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ on:
2121
jobs:
2222
ci:
2323
name: Build release
24-
runs-on: ubuntu-20.04
24+
runs-on: ubuntu-latest
2525
env:
2626
MIX_ENV: prod
2727
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28-
ELIXIR_VERSION: 1.13.4
29-
OTP_VERSION: 25.3.2
28+
ELIXIR_VERSION: 1.18.3
29+
OTP_VERSION: 27.3.3
3030
steps:
3131
- uses: rlespinasse/[email protected]
3232
- uses: actions/checkout@v4

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
jobs:
2020
ci:
2121
name: Run CI
22-
runs-on: ubuntu-20.04
22+
runs-on: ubuntu-latest
2323
env:
2424
MIX_ENV: test
2525
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ Cadet is the web application powering Source Academy.
2020

2121
It is probably okay to use a different version of PostgreSQL or Erlang/OTP, but using a different version of Elixir may result in differences in e.g. `mix format`.
2222

23+
> ## Setting up PostgreSQL
24+
>
25+
> The simplest way to get started is to use Docker. Simply [install Docker](https://docs.docker.com/get-docker/) and run the following command:
26+
>
27+
> ```bash
28+
> $ docker run --name sa-backend-db -e POSTGRES_HOST_AUTH_METHOD=trust -e -p 5432:5432 -d postgres
29+
> ```
30+
>
31+
> This configures PostgreSQL on port 5432. You can then connect to the database using `localhost:5432` as the host and `postgres` as the username. Note: `-e POSTGRES_HOST_AUTH_METHOD=trust` is used to disable password authentication for local development; since we are only accesing the database locally from our own machine, it is safe to do so.
32+
2333
### Setting up your local development environment
2434
2535
1. Set up the development secrets (replace the values appropriately)
@@ -29,8 +39,6 @@ It is probably okay to use a different version of PostgreSQL or Erlang/OTP, but
2939
$ vim config/dev.secrets.exs
3040
```
3141
32-
- To use NUSNET authentication, specify the NUS ADFS OAuth2 URL. (Ask for it.) Note that the frontend will supply the ADFS client ID and redirect URL (so you will need that too, but not here).
33-
3442
2. Install Elixir dependencies
3543

3644
```bash
@@ -49,19 +57,6 @@ It is probably okay to use a different version of PostgreSQL or Erlang/OTP, but
4957
$ mix ecto.setup
5058
```
5159

52-
If you encounter error message about invalid password for the user "postgres".
53-
You should reset the "postgres" password:
54-
55-
```bash
56-
$ sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
57-
```
58-
59-
and restart postgres service:
60-
61-
```bash
62-
$ sudo service postgresql restart
63-
```
64-
6560
By default, the database is populated with 10 students and 5 assessments. Each student will have a submission to the corresponding submission. This can be changed in `priv/repo/seeds.exs` with the variables `number_of_students`, `number_of_assessments` and `number_of_questions`. Save the changes and run:
6661

6762
```bash

0 commit comments

Comments
 (0)