-
Notifications
You must be signed in to change notification settings - Fork 75
146 lines (144 loc) · 4.29 KB
/
Copy pathchecks.yml
File metadata and controls
146 lines (144 loc) · 4.29 KB
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
name: Build Check
on:
push:
branches: [main]
pull_request:
branches: [main]
merge_group:
jobs:
build_data:
name: Build Bogota data artifacts
runs-on: ubuntu-latest
env:
DAGGER_NO_NAG: 1
steps:
- uses: actions/checkout@v6
- name: Install Dagger
uses: dagger/dagger-for-github@v8.4.0
with:
version: "latest"
- name: Copy .bin-env
run: cp .bin-env-example .bin-env
- name: Build data artifacts
run: bin/build builds/Bogota
- name: Upload data artifacts
uses: actions/upload-artifact@v5
with:
name: bogota-artifacts-${{ github.sha }}
path: data/Bogota
retention-days: 7
build_images:
name: Build service images
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install Dagger
uses: dagger/dagger-for-github@v8.4.0
with:
version: "latest"
- name: Build service images
run: bin/build-images
- name: Save Docker images
run: |
docker save $(docker images --format "{{.Repository}}:{{.Tag}}" | grep headway) | gzip > docker-images.tar.gz
- name: Upload Docker images
uses: actions/upload-artifact@v5
with:
name: docker-images-${{ github.sha }}
path: docker-images.tar.gz
retention-days: 7
www_checks:
defaults:
run:
working-directory: services/frontend/www-app
name: Frontend checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm install --global yarn
- run: yarn install
- run: yarn quasar prepare
- run: yarn lint
- run: yarn format-check
- run: yarn tsc
- run: yarn test
travelmux_checks:
defaults:
run:
working-directory: services/travelmux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
services/travelmux/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: cargo fmt --all --check
- run: cargo clippy --all-features
- run: cargo test --all-targets
- run: cargo build --release
gtfout:
defaults:
run:
working-directory: services/gtfs/gtfout
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
services/travelmux/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: cargo fmt --all --check
- run: cargo clippy --all-targets --all-features
- run: cargo test --all-targets --all-features
- run: cargo build --release
integration_tests:
name: Integration Tests
runs-on: ubuntu-latest
needs: [build_data, build_images]
steps:
- uses: actions/checkout@v6
- name: Install jq
run: sudo apt-get update && sudo apt-get install -y jq
- name: Download data artifacts
uses: actions/download-artifact@v6
with:
name: bogota-artifacts-${{ github.sha }}
path: data/Bogota
- name: Download Docker images
uses: actions/download-artifact@v6
with:
name: docker-images-${{ github.sha }}
path: .
- name: Load Docker images
run: gunzip -c docker-images.tar.gz | docker load
- name: Run integration tests
run: tests/integration/run-integration-tests.sh builds/Bogota
- name: Collect logs on failure
if: failure()
run: docker compose logs > integration-test-logs.txt
- name: Upload logs
if: failure()
uses: actions/upload-artifact@v5
with:
name: integration-test-logs
path: integration-test-logs.txt