decred.org/dcrdex@v1.0.5/.github/workflows/build.yml (about) 1 name: Build and Test 2 on: [push, pull_request] 3 permissions: 4 contents: read 5 jobs: 6 build-go: 7 name: Go CI 8 runs-on: ubuntu-latest 9 strategy: 10 matrix: 11 go: ['1.24', '1.25'] 12 steps: 13 - uses: awalsh128/cache-apt-pkgs-action@acb598e5ddbc6f68a970c5da0688d2f3a9f04d05 #v1.6.0 14 with: 15 packages: git-restore-mtime libgtk-3-dev libwebkit2gtk-4.1-dev 16 version: 1.0 17 18 - name: Check out source 19 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0 20 with: 21 fetch-depth: 0 22 23 - name: Set up Go 24 uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c #v6.1.0 25 with: 26 go-version: ${{ matrix.go }} 27 cache: true 28 29 # Restore original file modification times for test cache reasons 30 - name: restore timestamps 31 run: git restore-mtime 32 - name: Install Linters 33 run: "curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.6.2" 34 35 - name: Test 36 run: | 37 mkdir -p client/webserver/site/dist 38 touch -t 2306151245 client/webserver/site/dist/placeholder 39 ./run_tests.sh 40 build-js: 41 name: Build JS 42 runs-on: ubuntu-latest 43 strategy: 44 matrix: 45 node-version: [18.x, 20.x] 46 steps: 47 - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0 48 - name: Use nodejs ${{ matrix.node-version }} 49 uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 #v5.0.0 50 with: 51 node-version: ${{ matrix.node-version }} 52 - name: npm clean-install 53 working-directory: ./client/webserver/site 54 run: npm ci 55 - name: npm run lint 56 working-directory: ./client/webserver/site 57 run: npm run lint 58 - name: npm run build 59 working-directory: ./client/webserver/site 60 run: npm run build 61 62 lint-docs: 63 name: Lint Markdown 64 runs-on: ubuntu-latest 65 steps: 66 - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0 67 - uses: DavidAnson/markdownlint-cli2-action@30a0e04f1870d58f8d717450cc6134995f993c63 #v21.0.0 68 continue-on-error: true 69 with: 70 globs: | 71 *.md 72 docs/**/*.md