Read-only mirror — the public repositories of the Forgejo instance, refreshed every 10 minutes. The live instance (fg.dieschoenewolke.de) is reachable only over the VPN; clone here with https://git.dieschoenewolke.de/git/<owner>/<repo>.git.
summaryrefslogtreecommitdiff
path: root/.github/workflows/test.yml
blob: e97c88f127edd8493d311500e13acb25ac8c10bf (plain)
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
name: Build and Test

on:
  pull_request:
  push:
    branches:
      - master
      - releases/*

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1 # todo: switch to v2
      - run: npm ci
      - run: npm run build
      - run: npm run format-check
      - run: npm run lint
      - run: npm run pack
      - run: npm run gendocs
      - run: npm test
      - name: Verify no unstaged changes
        run: __test__/verify-no-unstaged-changes.sh

  test:
    strategy:
      matrix:
        runs-on: [ubuntu-latest, macos-latest, windows-latest]
    runs-on: ${{ matrix.runs-on }}

    steps:
      # Clone this repo
      - name: Checkout
        uses: actions/checkout@v2

      # Basic checkout
      - name: Basic checkout
        uses: ./
        with:
          ref: test-data/v2/basic
          path: basic
      - name: Verify basic
        shell: bash
        run: __test__/verify-basic.sh

      # Clean
      - name: Modify work tree
        shell: bash
        run: __test__/modify-work-tree.sh
      - name: Clean checkout
        uses: ./
        with:
          ref: test-data/v2/basic
          path: basic
      - name: Verify clean
        shell: bash
        run: __test__/verify-clean.sh

      # Side by side
      - name: Side by side checkout 1
        uses: ./
        with:
          ref: test-data/v2/side-by-side-1
          path: side-by-side-1
      - name: Side by side checkout 2
        uses: ./
        with:
          ref: test-data/v2/side-by-side-2
          path: side-by-side-2
      - name: Verify side by side
        shell: bash
        run: __test__/verify-side-by-side.sh

      # LFS
      - name: LFS checkout
        uses: ./
        with:
          repository: actions/checkout # hardcoded, otherwise doesn't work from a fork
          ref: test-data/v2/lfs
          path: lfs
          lfs: true
      - name: Verify LFS
        shell: bash
        run: __test__/verify-lfs.sh

  test-job-container:
    runs-on: ubuntu-latest
    container: alpine:latest
    steps:
      # Clone this repo
      - name: Checkout
        uses: actions/checkout@v2

      # Basic checkout
      - name: Basic checkout
        uses: ./
        with:
          ref: test-data/v2/basic
          path: basic
      - name: Verify basic
        run: __test__/verify-basic.sh --archive