This repository has been archived by the owner on May 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
86 lines (79 loc) · 2.9 KB
/
pkg_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: OONI API packaging and end to end testing
on: pull_request
jobs:
create_deb_package:
# Build .deb package
runs-on: "ubuntu-20.04"
container: debian:10
steps:
- name: Change Owner of Container Working Directory
run: chown root:root .
- name: Install git
run: |
apt-get update -q
apt-get install -y git
- name: Check out repository code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install depedencies
run: |
echo "deb http://deb.debian.org/debian buster-backports main" > /etc/apt/sources.list.d/backports.list
apt-get update -q
apt-get install -y --no-install-recommends git python3 python3-requests python3-gnupg s3cmd wget
- name: Fetch debops-ci
run: |
wget https://raw.githubusercontent.com/ooni/sysadmin/master/tools/debops-ci
chmod +x debops-ci
- name: Build the package
run: ./debops-ci --show-commands ci --bucket-name ooni-internal-deb
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
DEB_GPG_KEY: ${{ secrets.DEB_GPG_KEY }}
# end_to_end_test:
# # Deploy API + fastpath + database + ooniprobe
# needs: create_deb_package
# runs-on: "ubuntu-20.04"
# # Primary container image where all commands run
# container: debian:10
#
# services:
# postgres:
# image: postgres
# ports:
# - 5432:5432
# env:
# POSTGRES_PASSWORD: postgres
# POSTGRES_HOST_AUTH_METHOD: trust
# options: >-
# --health-cmd pg_isready
# --health-interval 10s
# --health-timeout 5s
# --health-retries 5
#
# steps:
# - name: Install git
# run: |
# apt-get update -q
# apt-get install -y git
#
# - name: Check out repository code
# uses: actions/checkout@v2
# with:
# fetch-depth: 0
#
# - name: Install depedencies
# run: |
# whoami
# DEBIAN_FRONTEND=noninteractive apt-get update
# DEBIAN_FRONTEND=noninteractive apt-get install -y ca-certificates gnupg
# echo "deb http://deb-ci.ooni.org unstable main" > /etc/apt/sources.list.d/deb-ci.list
# echo "deb http://deb.debian.org/debian buster-backports main" > /etc/apt/sources.list.d/backports.list
# apt-key adv --verbose --keyserver hkp://keyserver.ubuntu.com --recv-keys "B5A08F01796E7F521861B449372D1FF271F2DD50"
# DEBIAN_FRONTEND=noninteractive apt-get update
# DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y openssh-client ssl-cert
# mkdir -p /run/nodeexp/
#
# - name: Install fastpath analysis and ooni-api
# run: DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y fastpath analysis ooni-api