2672b17f44
* feat: sftp test: add tests for ftp and sftp * chore: ci fixes * chore: potential race fix * fix: simplify existence checks * fix: split path differently for ftp * fix: 🤷 * chore: add debug print * chore: lint * chore: idk dude * chore: ? * chore: more logs * chore: wipe mods before tests * chore: logs * chore: wat * chore: wait? * chore: no errors * chore: gh actions are 💩 * fix: always sync after copy * chore: remove some test logs * chore: remove test progress watcher * refactor: change progress to writer * chore: logs * chore: different logs * chore: whoops * chore: moar logs * chore: even moar logs * chore: what is life * chore: why are we here * chore: we are just bags of water floating through space * chore: are you real? * chore: ? * chore: if you get a single update now I call bs * chore: ok what if we just do one? * chore: ok what if we do two? * chore: this should not work * chore: wait no, this one * chore: fml * chore: remove logs * chore: what if we just wait a little * chore: retry * chore: move error * chore: verbose log * chore: remove explicit sleep * chore: remove debug * fix: linux pathing on windows * fix: clean paths properly * fix: fuck ftp * fix: send update on vanilla * feat: parallel ftp * fix: remove potential credential leak
110 lines
3.1 KiB
YAML
110 lines
3.1 KiB
YAML
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: Set up Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.21.4
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v2
|
|
|
|
- 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@v4
|
|
with:
|
|
name: cli-${{ matrix.os }}
|
|
path: ficsit-cli
|
|
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.21.4
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v2
|
|
|
|
- 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@v2
|
|
with:
|
|
version: v1.55.2
|
|
skip-pkg-cache: true
|
|
skip-build-cache: true
|
|
|
|
test:
|
|
name: Test
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.21.4
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup steamcmd
|
|
uses: CyberAndrii/setup-steamcmd@v1
|
|
|
|
- name: Install Satisfactory Dedicated Server
|
|
run: steamcmd +login anonymous +force_install_dir ${{ github.workspace }}/SatisfactoryDedicatedServer +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
|