Merge branch 'master' into gamefeatures #411
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: push | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| name: Build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Check out code into the Go module directory | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: 1.21.4 | |
| - name: Download GQL schema | |
| run: "npx graphqurl https://api.ficsit.dev/v2/query --introspect -H 'content-type: application/json' > schema.graphql" | |
| - name: Go Generate | |
| run: go generate -tags tools -x ./... | |
| - name: Build | |
| run: go build -v -o ficsit-cli . | |
| env: | |
| CGO_ENABLED: 1 | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: cli-${{ matrix.os }} | |
| path: ficsit-cli | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code into the Go module directory | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: 1.21.4 | |
| - name: Download GQL schema | |
| run: "npx graphqurl https://api.ficsit.dev/v2/query --introspect -H 'content-type: application/json' > schema.graphql" | |
| - name: Go Generate | |
| run: go generate -tags tools -x ./... | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v6.4.1 | |
| with: | |
| version: v1.62.2 | |
| test: | |
| name: Test | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Check out code into the Go module directory | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: 1.21.4 | |
| - name: Setup steamcmd | |
| uses: CyberAndrii/setup-steamcmd@v1 | |
| - name: Install Satisfactory Dedicated Server | |
| run: | | |
| # Run steamcmd twice to work around some weird caching/out of order execution issue that causes steamcmd to fail to download the app on the first try | |
| steamcmd +login anonymous +app_info_update 1 validate +quit | |
| steamcmd +force_install_dir "${{ github.workspace }}/SatisfactoryDedicatedServer" +login anonymous +app_update 1690800 validate +quit | |
| - name: Change directory permissions | |
| if: ${{ matrix.os == 'ubuntu-latest' }} | |
| run: mkdir -p ${{ github.workspace }}/SatisfactoryDedicatedServer/FactoryGame/Mods && chmod -R 777 ${{ github.workspace }}/SatisfactoryDedicatedServer | |
| - name: List directory (linux) | |
| if: ${{ matrix.os == 'ubuntu-latest' }} | |
| run: ls -lR | |
| - name: List directory (windows) | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| run: tree /F | |
| - name: Boot ftp and sftp | |
| if: ${{ matrix.os == 'ubuntu-latest' }} | |
| run: docker compose -f docker-compose-test.yml up -d | |
| - name: Download GQL schema | |
| run: "npx graphqurl https://api.ficsit.dev/v2/query --introspect -H 'content-type: application/json' > schema.graphql" | |
| - name: Go Generate | |
| run: go generate -tags tools -x ./... | |
| - name: Test | |
| run: go test -race -v ./... | |
| env: | |
| SF_DEDICATED_SERVER: ${{ github.workspace }}/SatisfactoryDedicatedServer |